markknowsley
Programmer
I've created an aspx page with the following code behind:
string stringUsername = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
lblUserName.Text = stringUsername;
However, when I copy this website to a web server and access the page, it returns:
<servername>\ASPNET
I've set up integrated authentication for this virtual directory on IIS but am not getting back <domain>\<username> as I would expect.
Can anyone tell me where I'm going wrong?
string stringUsername = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
lblUserName.Text = stringUsername;
However, when I copy this website to a web server and access the page, it returns:
<servername>\ASPNET
I've set up integrated authentication for this virtual directory on IIS but am not getting back <domain>\<username> as I would expect.
Can anyone tell me where I'm going wrong?