This documentation is archived and is not being maintained.

SessionStateStoreProviderBase.SetAndReleaseItemExclusive Method

Updates the session-item information in the session-state data store with values from the current request, and clears the lock on the data.

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

public abstract void SetAndReleaseItemExclusive (
	HttpContext context,
	string id,
	SessionStateStoreData item,
	Object lockId,
	bool newItem
)
public abstract void SetAndReleaseItemExclusive (
	HttpContext context, 
	String id, 
	SessionStateStoreData item, 
	Object lockId, 
	boolean newItem
)
public abstract function SetAndReleaseItemExclusive (
	context : HttpContext, 
	id : String, 
	item : SessionStateStoreData, 
	lockId : Object, 
	newItem : boolean
)
Not applicable.

Parameters

context

The HttpContext for the current request.

id

The session identifier for the current request.

item

The SessionStateStoreData object that contains the current session values to be stored.

lockId

The lock identifier for the current request.

newItem

true to identify the session item as a new item; false to identify the session item as an existing item.

The SessionStateModule object calls the SetAndReleaseItemExclusive method at the end of a request, during the ReleaseRequestState event, to insert current session-item information into the data store or update existing session-item information in the data store with current values, to update the expiration time on the item, and to release the lock on the data. Only session data for the current application that matches the supplied session id and lockId values is updated. For more information about locking, see "Locking Session Store Data" in the SessionStateStoreProviderBase class overview.

If the session values for the current request have not been modified, the SetAndReleaseItemExclusive method is not called. Instead, the ReleaseItemExclusive method is called.

If the Abandon method has been called, the SetAndReleaseItemExclusive method is not called. Instead, the SessionStateModule object calls the RemoveItem method to delete session-item data from the data source.

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: