System.Web.SessionState.SessionStateStoreProviderBase.CreateNewStoreData Method

Creates a new System.Web.SessionState.SessionStateStoreData object to be used for the current request.

Syntax

public abstract SessionStateStoreData CreateNewStoreData (System.Web.HttpContext context, int timeout)

Parameters

context
The System.Web.HttpContext for the current request.
timeout
The session-state HttpSessionState.Timeout value for the new System.Web.SessionState.SessionStateStoreData.

Returns

A new System.Web.SessionState.SessionStateStoreData for the current request.

Remarks

The System.Web.SessionState.SessionStateModule object calls the SessionStateStoreProviderBase.CreateNewStoreData(System.Web.HttpContext, int) method at the beginning of a request for an ASP.NET page, during the System.Web.HttpApplication.AcquireRequestState event. The SessionStateStoreProviderBase.CreateNewStoreData(System.Web.HttpContext, int) method is called if:

  • the incoming request has no session ID, or

  • the incoming request has a session ID, but the session is not found in the data store.

The SessionStateStoreProviderBase.CreateNewStoreData(System.Web.HttpContext, int) method creates a new System.Web.SessionState.SessionStateStoreData object with an empty System.Web.SessionState.ISessionStateItemCollection object, an System.Web.HttpStaticObjectsCollection collection, and the specified timeout value. The System.Web.HttpStaticObjectsCollection collection for the ASP.NET application can be retrieved using the SessionStateUtility.GetSessionStaticObjects(System.Web.HttpContext) method.

Requirements

Namespace: System.Web.SessionState
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0