HttpSessionStateContainer.HttpSessionStateContainer Constructor
Assembly: System.Web (in system.web.dll)
public: HttpSessionStateContainer ( String^ id, ISessionStateItemCollection^ sessionItems, HttpStaticObjectsCollection^ staticObjects, int timeout, bool newSession, HttpCookieMode cookieMode, SessionStateMode mode, bool isReadonly )
public HttpSessionStateContainer ( String id, ISessionStateItemCollection sessionItems, HttpStaticObjectsCollection staticObjects, int timeout, boolean newSession, HttpCookieMode cookieMode, SessionStateMode mode, boolean isReadonly )
public function HttpSessionStateContainer ( id : String, sessionItems : ISessionStateItemCollection, staticObjects : HttpStaticObjectsCollection, timeout : int, newSession : boolean, cookieMode : HttpCookieMode, mode : SessionStateMode, isReadonly : boolean )
Not applicable.
Parameters
- id
A session identifier for the new session. If a null reference (Nothing in Visual Basic), an ArgumentException is thrown.
- sessionItems
An ISessionStateItemCollection that contains the session values for the new session-state provider.
- staticObjects
An HttpStaticObjectsCollection that specifies the objects declared by <object Runat="Server" Scope="Session"/> tags within the ASP.NET application file Global.asax.
- timeout
The amount of time, in minutes, allowed between requests before the session-state provider terminates the session.
- newSession
true to indicate the session was created with the current request; otherwise, false.
- cookieMode
The CookieMode for the new session-state provider.
- mode
One of the SessionStateMode values that specifies the current session-state mode.
- isReadonly
true to indicate the session is read-only; otherwise, false.
The following code example shows the AcquireRequestState event handler for a custom session-state module that populates a new HttpSessionStateContainer object with new or existing session information and adds it to the HttpContext of the current request using the AddHttpSessionStateToContext method. For a full code example of a custom session-state module, see the SessionStateUtility class overview.