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 对象。

注解

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

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

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

适用于

另请参阅