I need to get the current user's identity of the local PC (with ASP.net & C#) while the web site is hosted in the Intranet.
Tried all the ways listed below.
Most of these methods works fine when I run the website in my local PC.
But
when it's running in the intranet, and when I open the pages from the local PC, it keeps giving me the Intranet Machine Account name or blank string as the Name.
I am using forms authentication and tried all the ways below.
1. HttpContext.Current.Request.LogonUserIdentity.Name;//Result: INTRANET_MACHINE_NAME\IUSR_INTRANET_MACHINE
2. HttpContext.Current.User.Identity.Name;//Result: 1308
3. HttpContext.Current.Request.ServerVariables["LOGON_USER"];//Result: Empty
4. HttpContext.Current.Request.ServerVariables["AUTH_USER"];//Result: Empty
5. HttpContext.Current.Items["CurrentUser"].ToStri ...
Go to the complete details ...