HttpContextBase.SetSessionStateBehavior(SessionStateBehavior) Method

Definition

When overridden in a derived class, sets the type of session state behavior that is required to support an HTTP request.

C#
public virtual void SetSessionStateBehavior(System.Web.SessionState.SessionStateBehavior sessionStateBehavior);

Parameters

sessionStateBehavior
SessionStateBehavior

One of the enumeration values that specifies what type of session state behavior is required.

Exceptions

A derived type fails to implement this method.

Remarks

The SetSessionStateBehavior method provides a base method that must be implemented by classes that inherit from this type. ASP.NET implements this method in the HttpContextWrapper and HttpContext classes.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also