Summary
The main object implements the iprincipal interface and represents a particular user (code represents the user's operation) security context. The subject object includes any role that the user's identity (as included IIDENTITY object) and the user belongs.
ASP.NET provides the following main body and identification object implementation:
• WindowsPrincipal and WindowsidentIndity objects indicate users who have authenticated identity using Windows authentication. For these objects, you can automatically get a list of roles from the Windows group of Windows users. • GenericPrincipal and GenericIdentity objects indicate users that have authenticated identity using Form authentication or other custom authentication mechanisms. For these objects, the role list is obtained in a custom manner (usually obtained from the database). • The FormSidentity and PassportIndIndEntity objects indicate users who have authenticated identity using Form authentication and Passport authentication.
The following tables illustrate the results identified from the Save IPrincipal and / or IIDENTITY objects within the range of IIS authentication settings. The following depot words are used in the table:
• httpContext = httpContext.current.user, which returns an iPrincipal object that contains security information that is currently a Web request. This is the authenticated web client. • WindowsIdentity = WindowsIdentity.getCurrent (), which returns the identity of the security context of the currently executed Win32 thread. • Thread = Thread.currentPrincipal, it returns the main body of the currently executed .NET thread (above Win32 thread).
Back to top
IIS anonymous authentication
Web.config setting variable position result identifier
Back to top
IIS basic authentication
Web.config Settings Variable Location Results
IIS Summary Authentication
Web.config Settings Variable Location Results
Back to top
IIS integrated Windows
Web.config Settings Variable Location Results