HttpListenerRequest.TransportContext 属性

定义

获取客户端请求的 TransportContext

public:
 property System::Net::TransportContext ^ TransportContext { System::Net::TransportContext ^ get(); };
public System.Net.TransportContext TransportContext { get; }
member this.TransportContext : System.Net.TransportContext
Public ReadOnly Property TransportContext As TransportContext

属性值

客户端请求的 TransportContext 对象。

注解

属性 TransportContext 可用于检索使用 HTTPS 发送的 的 (CBT) HttpListenerRequest 的通道绑定令牌。

应用程序可以使用 TransportContext 属性通过调用本机 Win32 AcceptSecurityContext 函数来执行自定义身份验证。

如果应用程序尝试使用 方法从此属性TransportContext中检索通道绑定令牌 (CBT) ,并且 ChannelBindingKind 不是 Endpoint,则 HttpListenerRequest 将引发 NotSupportedExceptionGetChannelBinding 使用 HttpListenerRequest 内部实现替代 GetChannelBinding 方法。

适用于

另请参阅