SessionStateModule.Init Method

Calls initialization code when a SessionStateModule object is created.

Namespace: System.Web.SessionState
Assembly: System.Web (in system.web.dll)

public:
virtual void Init (
	HttpApplication^ app
) sealed
public final void Init (
	HttpApplication app
)
public final function Init (
	app : HttpApplication
)
Not applicable.

Parameters

app

The current application.

Exception typeCondition

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 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: