Export (0) Print
Expand All

SessionStateStoreProviderBase.SetItemExpireCallback Method

Sets a reference to the SessionStateItemExpireCallback delegate for the Session_OnEnd event defined in the Global.asax file.

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

public abstract bool SetItemExpireCallback (
	SessionStateItemExpireCallback expireCallback
)
public abstract boolean SetItemExpireCallback (
	SessionStateItemExpireCallback expireCallback
)
public abstract function SetItemExpireCallback (
	expireCallback : SessionStateItemExpireCallback
) : boolean
Not applicable.

Parameters

expireCallback

The SessionStateItemExpireCallback delegate for the Session_OnEnd event defined in the Global.asax file.

Return Value

true if the session-state store provider supports calling the Session_OnEnd event; otherwise, false.

The SessionStateModule object calls the SetItemExpireCallback method when the module is initialized to determine whether calls to the Session_OnEnd event are supported by the SessionStateStoreProviderBase implementation and to associate the SessionStateItemExpireCallback delegate with the Session_OnEnd event.

Custom session-state store provider implementers should use the SetItemExpireCallback method to inform the SessionStateModule object whether calls to the Session_OnEnd event are supported and to set a local reference to the SessionStateItemExpireCallback delegate supplied by the expireCallback parameter. The custom implementation must decide when the local SessionStateItemExpireCallback delegate will be called. For example, the delegate could be called during the call to the RemoveItem method, which is called when a session is abandoned.

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

Community Additions

ADD
Show:
© 2014 Microsoft