This documentation is archived and is not being maintained.

SessionStateStoreProviderBase.CreateNewStoreData Method

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

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

public abstract SessionStateStoreData CreateNewStoreData (
	HttpContext context,
	int timeout
)
public abstract SessionStateStoreData CreateNewStoreData (
	HttpContext context, 
	int timeout
)
public abstract function CreateNewStoreData (
	context : HttpContext, 
	timeout : int
) : SessionStateStoreData
Not applicable.

Parameters

context

The HttpContext for the current request.

timeout

The session-state Timeout value for the new SessionStateStoreData.

Return Value

A new SessionStateStoreData for the current request.

The SessionStateModule object calls the CreateNewStoreData method at the beginning of a request for an ASP.NET page, during the AcquireRequestState event. The CreateNewStoreData 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 CreateNewStoreData method creates a new SessionStateStoreData object with an empty ISessionStateItemCollection object, an HttpStaticObjectsCollection collection, and the specified timeout value. The HttpStaticObjectsCollection collection for the ASP.NET application can be retrieved using the GetSessionStaticObjects method.

For an example of a session-state store provider implementation, see Implementing a Session-State Store Provider.

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
Show: