SessionStateModule::Init Method
Calls initialization code when a SessionStateModule object is created.
Assembly: System.Web (in System.Web.dll)
Parameters
- app
- Type: System.Web::HttpApplication
The current application.
Implements
IHttpModule::Init(HttpApplication)| Exception | Condition |
|---|---|
| HttpException | The mode attribute in the sessionState Element (ASP.NET Settings Schema) configuration element is set to StateServer or SQLServer, and the ASP.NET application has less than Medium trust. |
| ConfigurationErrorsException | The mode attribute in the sessionState Element (ASP.NET Settings Schema) configuration element is set to Custom and the customProvider attribute is empty or does not exist. -or- The mode attribute in the sessionState Element (ASP.NET Settings Schema) configuration element is set to Custom and the provider identified by name in the customProvider attribute has not been added to the providers Element for sessionState (ASP.NET Settings Schema) sub-element. |
This method is not intended to be called from application code.
An HttpApplication is created when an ASP.NET application is started. The HttpApplication object calls the Init method when it creates the SessionStateModule object for the application. The SessionStateModule class is specified in the configuration for an application.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.