HttpListenerRequest.TransportContext 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取客户端请求的 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) ,ChannelBindingKindEndpoint则不会引发HttpListenerRequest该令牌NotSupportedException。GetChannelBinding 此方法 HttpListenerRequest 使用 GetChannelBinding 内部实现替代方法。