Difference between WindowsIdentity.GetCurrent().Name and User.Idenetity.Name
By Santhosh N
This explains the difference between WindowsIdentity.GetCurrent().Name and User.Idenetity.Name in ASP.NET Web Application while using Impersonation.
WindowsIdentity.GetCurrent() would return the Windows Identity instance which is
the identity of the thread that is being run whereas User.Identity returns the
identity instance that the ISS pass to the client.
Hence, if IIS allows
a user to access the page anonymously, then User.Identity.Name return an empty
string.
Related FAQs
This explain how to allow Impersonation in ASP.NET Web Application.
This explain how to read the identity of the impersonated user in ASP.NET programatically.
This explain the page life cycle event that is best suited to set the Master Page for the webpage in ASP.NET programatically at runtime.
This explains the equivalent of global.asa of classic ASP in Asp.Net
This explains about the co-existence of ASP and ASP.Net websites in the same server
This explains the equivalent of ObjectRecordSet.MoveNext ofclassic ASP in Asp.Net
Difference between WindowsIdentity.GetCurrent().Name and User.Idenetity.Name (1236 Views)