From the identity impersonate= "false"

Source: Internet
Author: User
Tags anonymous httpcontext microsoft sql server net thread win32

Today, the process of the same Crystal Report interaction and Excel interaction can not come out, the Internet to find a solution: the identity impersonate= "true" to identity impersonate= "false".

So, to find the identity impersonate related data, find the comparison system of the introduction:asp.net identification matrix . Details are as follows: asp.net identification matrix page content

Goal
Applicable scope
How to use the contents of this chapter
Summary
IIS Anonymous Authentication
IIS Basic Authentication
IIS Digest Authentication
IIS Integrated Windows
Target

The objectives of this chapter are:

Understanding asp.net identities

Back to the top of the page Applicable scope

This chapter applies to the following products and technologies:

Windows Server SP3

Microsoft. NET Framework SP2

Microsoft SQL Server SP2 Returns the top of the page how to use the content of this chapter

This chapter is a reference section of the Guide to Building Secure ASP. NET applications. It contains additional information to help you learn more about the solutions described in the other chapters of this guide and should be read together. Back to the top of the page summary

The principal object implements the IPrincipal interface and represents a security context for a specific user (code that runs on behalf of that user). The principal object includes the user's identity (as the contained IIdentity object) and any roles that the user belongs to.

ASP.net provides the following principals and identity object implementations:

The WindowsPrincipal and WindowsIdentity objects represent users who have authenticated identities using Windows authentication. For these objects, you can automatically get a list of roles from the Windows group to which the Windows user belongs.

The GenericPrincipal and genericidentity objects represent users who have authenticated identities using forms authentication or other custom authentication mechanisms. For these objects, get a list of roles, usually obtained from the database, in a custom way.

The formsidentity and passportidentity objects represent users who have authenticated identities using form authentication and Passport authentication, respectively.

The following tables illustrate the identification of the results obtained from each variable that holds the IPrincipal and/or IIdentity objects within the scope of the IIS authentication settings. The following abbreviations are used in the table:

HttpContext = HttpContext.Current.User, which returns the IPrincipal object that contains the security information for the current WEB request. This is an authenticated Web client.

WindowsIdentity = windowsidentity.getcurrent (), which returns the identity of the security context of the currently executing WIN32 thread.

Thread = Thread.CurrentPrincipal, which returns the body of the currently executing. NET thread (on the WIN32 thread).

Back to the top of the page IIS Anonymous Authentication
Web.config settings Variable position Result identification

<identity impersonate= "true"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

-
Machine/iusr_machine
-

<identity impersonate= "false"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

-
Machine/aspnet
-

<identity impersonate= "true"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Machine/iusr_machine
User-supplied name

<identity impersonate= "false"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Machine/aspnet
User-supplied name

Back to the top of the page IIS Basic Authentication
Web.config settings Variable position Result identification

<identity impersonate= "true"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

Domain/user Name
Domain/user Name
Domain/user Name

<identity impersonate= "false"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

Domain/user Name
Machine/aspnet
Domain/user Name

<identity impersonate= "true"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Domain/user Name
User-supplied name

<identity impersonate= "false"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Machine/aspnet
User-supplied name

Back to the top of the page IIS Digest Authentication
Web.config settings Variable position Result identification

<identity impersonate= "true"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

Domain/user Name
Domain/user Name
Domain/user Name

<identity impersonate= "false"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

Domain/user Name
Machine/aspnet
Domain/user Name

<identity impersonate= "true"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Domain/user Name
User-supplied name

<identity impersonate= "false"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Machine/aspnet
User-supplied name

Back to the top of the page IIS Integrated Windows
Web.config settings Variable position Result identification

<identity impersonate= "true"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

Domain/user Name
Domain/user Name
Domain/user Name

<identity impersonate= "false"/>
<authentication mode= "Windows"/>

HttpContext
WindowsIdentity
Thread

Domain/user Name
Machine/aspnet
Domain/user Name

<identity impersonate= "true"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Domain/user Name
User-supplied name

<identity impersonate= "false"/>
<authentication mode= "Forms"/>

HttpContext
WindowsIdentity
Thread

User-supplied name
Machine/aspnet
User-supplied name


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.