System.Web 2.0.0.0 System.Object

The class provides static helper methods that are used by a session-state module or a session-state store provider. Application developers will not need to call these methods from their code.

The following table describes the ways the session-state module and session-state store provider use the methods.

Method

Use

method

Can be used by custom session-state modules to either retrieve session information for an existing session or create session information for a new session.

method

Called by the session-state module to add the session data to the current and make it available to application code through the property.

method

Called by the session-state module during the or events at the end of a request, to clear session data from the current .

method

Called by the session-state module to get a reference to the collection based on objects defined in the Global.asax file. The collection returned is included with the session data added to the current .

Session data is passed to and retrieved from the current as an object or any valid implementation of the interface.

For information about implementing a session-state store provider, see Implementing a Session State Store Provider.

Provides helper methods used by session-state modules and session-state store providers to manage session information for an ASP.NET application. This class cannot be inherited.

- Method
  2.0.0.0
  System.Void `` ``

  The method is used by a session-state module to apply session data to the current request. This occurs during the event at the beginning of a request. Session data for the current request is either retrieved for an existing session or created for a new session. The session data is then encapsulated in an implementation instance, which is passed to the method along with the current . The supplied session data is then made available to application code through the property of the current context.

  Applies the session data to the context for the current request.

  The object to which to add the object. The implementation instance to add to the specified HTTP context.
- Method
  2.0.0.0
  System.Web.SessionState.IHttpSessionState ``

  The method can be used by a session-state module to retrieve session data from the current request. This occurs during the event at the end of a request. The returned session data can then be written to the session data store. If the session has been abandoned, the session data can be removed from the data store and , and the Session_OnEnd event can be executed.

  Retrieves session data from the context for the current request.

  An implementation instance populated with session data from the current request.

  The from which to retrieve session data.
- Method
  2.0.0.0
  System.Web.HttpStaticObjectsCollection ``

  The method is used to retrieve the collection of static objects defined in the Global.asax file for the ASP.NET application. A session-state module implementation will supply the returned collection to the implementation instance that is added to the current context using the method.

  A can also use the method when creating a object.

  Gets a reference to the static objects collection for the specified context.

  An collection populated with the property value for the specified .

  The from which to get the static objects collection.
- Method
  2.0.0.0
  System.Void `` `` ``

  The method is used by a session-state module to execute the Session_OnEnd event defined in the Global.asax file for an ASP.NET application. A session-state module will call the method when a session has been abandoned, or if the session expires.

  Executes the Session_OnEnd event defined in the Global.asax file for the ASP.NET application.

  The implementation instance for the session that has ended. The event source object to supply to the Session_OnEnd event. The object to supply to the Session_OnEnd event.
- Method
  2.0.0.0
  System.Void ``

  The method clears session data from the specified . A session-state module will call the method in the handler for the event.

  Removes session data from the specified context.

  The from which to remove session data.