IdentitySection.Impersonate Property

Definition

Gets or sets a value indicating whether client impersonation is used on each request.

[System.Configuration.ConfigurationProperty("impersonate", DefaultValue=false)]
public bool Impersonate { get; set; }

Property Value

true if client impersonation is used; otherwise, false. The default value is false.

Attributes

Examples

The following code example shows how to access the Impersonate property. Refer to the code example of the IdentitySection class to learn how to access the section.

// Get the Impersonate property value.
bool currentImpersonate = identitySection.Impersonate;

// Set the Impersonate property to true.
identitySection.Impersonate = true;

Remarks

If the Impersonate property is set to true, each request is served by a Web application impersonating its client. That is, either the user currently logged on or the user specified by the UserName and Password properties. When the Impersonate property is set to false, the application does not impersonate any client user.

Note

For security reasons, the identity section supports storage of the encrypted UserName and Password.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also