Problems accessing logged on user via System.Security
In a C#/ASP web application, I used
String username = System.Security.Principal.WindowsIdentity.GetCurre nt().Name;
to get the username of the user currently logged on to Windows. And this works fine when accessing the webpage if it's on my own computer but when I publish the site and access it from anywhere else, it returns “NT AUTHORITY\NETWORK SERVICE” for the username.
Is there any way to have this work for people accessing the site from somewhere else as well?