Assembly: System.Web (in system.web.dll)
'Declaration Public Property User As IPrincipal 'Usage Dim instance As HttpContext Dim value As IPrincipal value = instance.User instance.User = value
/** @property */ public IPrincipal get_User () /** @property */ public void set_User (IPrincipal value)
Property ValueSecurity information for the current HTTP request.
Setting the User property requires the ControlPrincipal flag to be set.
The User property provides programmatic access to the properties and methods of the IPrincipal interface. Because ASP.NET pages contain a default reference to the System.Web namespace (which contains the HttpContext class), you can reference the members of HttpContext on an .aspx page without using the fully qualified class reference to HttpContext. For example, you can use User.Identity.Name to get the name of the user on whose behalf the current process is running. However, if you want to use the members of IPrincipal from an ASP.NET code-behind module, you must include a reference to the System.Web namespace in the module and a fully qualified reference to both the currently active request/response context and the class in System.Web that you want to use. For example, in a code-behind page you must specify the fully qualified name HttpContext.Current.User.Identity.Name.
|How to: Implement Passport Authentication in ASP.NET Applications||Building ASP .NET Web Applications|