System.Web.Security.WindowsAuthenticationEventArgs.User Property

Gets or sets the System.Security.Principal.IPrincipal object to be associated with the current request.

Syntax

public System.Security.Principal.IPrincipal User { set; get; }

Value

a System.Security.Principal.IPrincipal

Remarks

You can use the WindowsAuthenticationEventArgs.User property to set the System.Web.HttpContext.User property of the current System.Web.HttpContext to a custom System.Security.Principal.IPrincipal object.

If you do not specify a value for the WindowsAuthenticationEventArgs.User property during the WindowsAuthentication_OnAuthenticate event, the Windows identity supplied by IIS is used as the identity for the current request. If IIS uses anonymous authentication, then the WindowsAuthenticationEventArgs.Identity property is set to the identity returned by the System.Security.Principal.WindowsIdentity.GetAnonymous method.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0