HttpContext.IsWebSocketRequest 属性

定义

获取一个值,该值指示此请求是否是一个 AspNetWebSocket 请求。Gets a value that indicates whether the request is an AspNetWebSocket request.

public:
 property bool IsWebSocketRequest { bool get(); };
public bool IsWebSocketRequest { get; }
member this.IsWebSocketRequest : bool
Public ReadOnly Property IsWebSocketRequest As Boolean

属性值

如果该请求是一个 AspNetWebSocket 请求,则为 true,否则为 falsetrue if the request is an AspNetWebSocket request; otherwise, false.

注解

如果请求包含初始 AspNetWebSocket 握手并且 IIS 的 WebSocket 模块处于活动状态,则此方法返回 trueThis method returns true if the request contains the initial AspNetWebSocket handshake and the WebSocket module of IIS is active.

适用于