Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IReadOnlySessionState Interface

IReadOnlySessionState Interface

Specifies that the target HTTP handler requires only read access to session-state values. This is a marker interface and has no methods.

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

public interface IReadOnlySessionState : IRequiresSessionState

Implement the IReadOnlySessionState interface in your custom handler to identify that your handler requires only read access to session-state values.

The following code example examines the current HTTP Handler property to determine whether it requires only read access to session-state values.

bool readOnlySession = false;

if (Context.Handler is IReadOnlySessionState)
  readOnlySession = true;

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft