Posts

Showing posts from November 26, 2008

IIS ASP.Net - What identity is your page running in?

Image
There are at least three identities that I know of when you run an ASP.Net page on an IIS server. They are: At the page level: Page.User.Identity At the thread level: System.Threading.Thread.CurrentPrincipal.Identity At the process level: System.Security.Principal.WindowsIdentity.GetCurrent() Then there are authentication and impersonation modes to set. In Vista, the Computer Management configuration is not as neat as XP or Server 2003, as follows: The different identities have values as follows (the IIS server is mozart and the web browser user is UserA): Authentication Mode ASP.Net Impersonation Process Thread Page Anonymous False NT AUTHORITY\ NETWORK SERVICE - - Anonymous True NT AUTHORITY\ IUSR - - Windows False NT AUTHORITY\ NETWORK SERVICE mozart\UserA mozart\UserA Windows True mozart\UserA mozart\UserA mozart\UserA References: Process and Thread Identity in ASP.Net - A Practical Approach