Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Security / July 2004

Tip: Looking for answers? Try searching our database.

Getting windows username

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Dixon - 21 Jul 2004 12:37 GMT
I am developing an intranet and was wondering, when a user logs on is there
a way to get the username of the windows account in asp.net.

I have tried the following but they return the worker process username e.g
DOMAIN\ASPNET

Can somone suggest a way or provide some code the get the username of the
logged on account in windows

Thanks
Jonathan Dixon

User.Identity.Name.ToString();

System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
Jonathan Dixon - 21 Jul 2004 12:41 GMT
It was just a matter of disabling annonomous access

Thanks

> I am developing an intranet and was wondering, when a user logs on is there
> a way to get the username of the windows account in asp.net.
[quoted text clipped - 11 lines]
>
> System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
Jonathan Dixon - 21 Jul 2004 14:20 GMT
I have came accross a problem when putting it on a server it ust get the
servers logon name,

Is there a way, it will be a intranet and users will logon with the user
account onto windows, the intranet web page will then appear, i want the
intranet web page to get the account name from the person logged on to the
computer in the asp.net page.

I hope that is clear i am not sure how to phrase it so

if i logon as

Jonathan

the asp.net webpage would get Jonathan

at the same time a colleague logs on to windows as andrew, the intranet web
page loads up and get his username which is andrew.

Any idea how to do this.

Regards

Jonathan Dixon
HG - 23 Jul 2004 11:43 GMT
Hi Jonathan.

I am not sure I understand you correctly, but I think you should use
Integrated Security to do just that.
I saw a wonderful article on what to use in different setups on MSDN, but I
can't remember the URL.

Try searching on MSDN for Integrated Security Intranet

Regards

Henrik

> I have came accross a problem when putting it on a server it ust get the
> servers logon name,
[quoted text clipped - 20 lines]
>
> Jonathan Dixon

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.