System.Web.Security.FormsAuthenticationModule Class

Sets the identity of the user for an ASP.NET application when forms authentication is enabled. This class cannot be inherited.

See Also: FormsAuthenticationModule Members


public sealed class FormsAuthenticationModule : System.Web.IHttpModule


The System.Web.Security.FormsAuthenticationModule sets the current System.Web.HttpContext.User property to an System.Security.Principal.IPrincipal object that represents the user identity for the current request when the authentication System.Web.Configuration.AuthenticationSection.Mode is set to System.Web.Configuration.AuthenticationMode.Forms in the authentication element of the application's configuration file.

The System.Web.Security.FormsAuthenticationModule exposes an FormsAuthenticationModule.Authenticate event that enables you to provide a custom System.Security.Principal.IPrincipal object for the System.Web.HttpContext.User property of the current System.Web.HttpContext. The FormsAuthenticationModule.Authenticate event is accessed by specifying a subroutine named FormsAuthentication_OnAuthenticate in the Global.asax file for your ASP.NET application.


In IISĀ 7.0, using the System.Web.Security.WindowsAuthenticationModule with the System.Web.Security.FormsAuthenticationModule is not supported. For more information about compatibility issues in Integrated modes, see Moving an ASP.NET Application from IIS 6.0 to IIS 7.0.


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