SessionStateModule.Init(HttpApplication) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Calls initialization code when a SessionStateModule object is created.
public:
virtual void Init(System::Web::HttpApplication ^ app);
public void Init (System.Web.HttpApplication app);
abstract member Init : System.Web.HttpApplication -> unit
override this.Init : System.Web.HttpApplication -> unit
Public Sub Init (app As HttpApplication)
Parameters
- app
- HttpApplication
The current application.
Implements
Exceptions
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.
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)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/h6bb9cz9(v=vs.100)) 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.
Remarks
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.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om