System.Web.SessionState.SessionStateStoreProviderBase.ReleaseItemExclusive Method

Releases a lock on an item in the session data store.

Syntax

public abstract void ReleaseItemExclusive (System.Web.HttpContext context, string id, object lockId)

Parameters

context
The System.Web.HttpContext for the current request.
id
The session identifier for the current request.
lockId
The lock identifier for the current request.

Remarks

The System.Web.SessionState.SessionStateModule object calls the SessionStateStoreProviderBase.ReleaseItemExclusive(System.Web.HttpContext, string, object) method to update the expiration date and release a lock on an item in the session data store. It is called at the end of a request, during the System.Web.HttpApplication.ReleaseRequestState event, if session values are unchanged. If session values have been modified, the System.Web.SessionState.SessionStateModule object instead calls the SessionStateStoreProviderBase.SetAndReleaseItemExclusive(System.Web.HttpContext, string, SessionStateStoreData, object, bool) method.

The System.Web.SessionState.SessionStateModule object also calls the SessionStateStoreProviderBase.ReleaseItemExclusive(System.Web.HttpContext, string, object) method when a lock on an item in the session data store has exceeded the System.Web.Configuration.HttpRuntimeSection.ExecutionTimeout value. For more information about locking and details about the lock identifier, see "Locking Session-Store Data" in the System.Web.SessionState.SessionStateStoreProviderBase class overview.

The SessionStateStoreProviderBase.ReleaseItemExclusive(System.Web.HttpContext, string, object) method only removes the lock from an item in the session data store for the current application that matches the supplied session id and lockId values. If the lockId does not match the one in the data store, the SessionStateStoreProviderBase.ReleaseItemExclusive(System.Web.HttpContext, string, object) method does nothing.

Requirements

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