travisowens
Centurion
I'm in an intranet/Windows domain setup on Windows 2003 and IIS6 coding an ASP.Net 1.1 Intranet application.
I need to retrieve the currnet web viewer's username (as authorized by the domain) but cannot seem to retrieve it anywhere. I notice products like MS Sharpeoint 2003 knows the username with a user typing it in. How can I get the username, I have tried the following ways below and as you can see, I always end up getting the username the ASP.Net is running as.
System.Security.Principal.WindowsIdentity.GetCurrent().Name: NT AUTHORITY\NETWORK SERVICE
System.Threading.Thread.CurrentPrincipal.Identity.Name:
System.Threading.Thread.CurrentThread.Name:
System.Windows.Forms.SystemInformation.UserName: NETWORK SERVICE
I need to retrieve the currnet web viewer's username (as authorized by the domain) but cannot seem to retrieve it anywhere. I notice products like MS Sharpeoint 2003 knows the username with a user typing it in. How can I get the username, I have tried the following ways below and as you can see, I always end up getting the username the ASP.Net is running as.
System.Security.Principal.WindowsIdentity.GetCurrent().Name: NT AUTHORITY\NETWORK SERVICE
System.Threading.Thread.CurrentPrincipal.Identity.Name:
System.Threading.Thread.CurrentThread.Name:
System.Windows.Forms.SystemInformation.UserName: NETWORK SERVICE