SessionStateBehavior 枚举

定义

指定处理请求所需的会话支持的类型。Specifies the type of session support that is required in order to handle a request.

public enum class SessionStateBehavior
public enum SessionStateBehavior
type SessionStateBehavior = 
Public Enum SessionStateBehavior
继承
SessionStateBehavior

字段

Default 0

使用默认 ASP.NET 逻辑来确定请求的会话状态行为。The default ASP.NET logic is used to determine the session state behavior for the request. 默认逻辑是寻找 IHttpHandler 中是否存在标记会话状态接口。The default logic looks for the existence of marker session state interfaces on the IHttpHandler.

Disabled 3

未启用会话状态来处理请求。Session state is not enabled for processing the request. 此设置将覆盖已通过检查请求的处理程序确定的任何会话行为。This setting overrides whatever session behavior would have been determined by inspecting the handler for the request.

ReadOnly 2

为请求启用只读会话状态。Read-only session state is enabled for the request. 这意味着会话状态无法更新。This means that session state cannot be updated. 此设置将覆盖已通过检查请求的处理程序确定的任何会话状态行为。This setting overrides whatever session state behavior would have been determined by inspecting the handler for the request.

Required 1

为请求启用完全的读写会话状态行为。Full read-write session state behavior is enabled for the request. 此设置将覆盖已通过检查请求的处理程序确定的任何会话行为。This setting overrides whatever session behavior would have been determined by inspecting the handler for the request.

注解

SessionStateBehavior 枚举SetSessionStateBehavior与方法一起使用。The SessionStateBehavior enumeration is used with the SetSessionStateBehavior method. 您可以调用此方法以指示需要会话状态支持来处理请求, 并传递SessionStateBehavior枚举值来指定应用于请求的会话状态行为的类型。You can call this method to indicate that session state support is needed to handle a request, and pass a SessionStateBehavior enumeration value to specify what type of session state behavior applies to the request.

适用于

另请参阅