Last post Dec 21, 2007 08:29 AM by MilesG
Dec 19, 2007 01:23 PM|MilesG|LINK
System.Security.Principal.WindowsIdentity.GetCurrent().name returns the ASPNET account.
What do I need to do to retrieve the logged in userid/name?
Dec 21, 2007 03:03 AM|johram|LINK
The reason why you don't get any satisfying answers is because your web is configured to allow anonymous access. There's no way for IIS to guess who's behind that browser, unless you configure the web to explicitly require authentication. So make sure you
uncheck anonymous and allow integrated authentication. Credentials will be sent automatically from Internet Explorer to IIS, so IIS will know which user is doing the request.
Dec 21, 2007 08:29 AM|MilesG|LINK
Thanks for the idea, however I can't figure out how to get rid of the authentication box that keeps popping up. I have different combinations of Integrated Authentication, Digest and Basic authentication. I still get the login box. I have tried creating
a virtual directory off of main website and more importantly, I have remoted into the server and tried running it from there, same result. I even added my user name into .NET as an authorized role.