TransportContext 类

定义

TransportContext 类提供有关基础传输层的附加上下文。The TransportContext class provides additional context about the underlying transport layer.

public ref class TransportContext abstract
public abstract class TransportContext
type TransportContext = class
Public MustInherit Class TransportContext
继承
TransportContext

注解

TransportContext 类与 System.Security.Authentication.ExtendedProtection 命名空间中的类一起使用,以便为使用应用程序的扩展保护的身份验证提供支持。The TransportContext class is used with classes in the System.Security.Authentication.ExtendedProtection namespace to provide support for authentication using extended protection for applications.

集成式 Windows 身份验证的设计能使某些凭据质询响应变得通用,这意味着可以重新使用或转发这些响应。The design of integrated Windows authentication allows for some credential challenge responses to be universal, meaning they can be re-used or forwarded. 如果此特定设计功能不是必需的,则应至少用特定于目标的信息以及特定于通道的特定信息来构造质询响应。If this particular design feature is not needed then the challenge responses should be constructed with, at minimum, target specific information and, at best, also some channel specific information. 然后,服务可以提供扩展保护,以确保凭据质询响应包含特定于服务的信息(服务提供程序名称或 SPN),并在必要时提供特定于通道的信息(通道绑定令牌或 CBT)。Services can then provide extended protection to ensure that credential challenge responses contain service specific information (a Service Provider Name or SPN) and, if necessary, channel specific information (a channel binding token or CBT). 使用凭据交换中的此信息,服务可以更好地防止恶意使用可能未正确获取的凭据质询响应。With this information in the credential exchanges, services are able to better protect against malicious use of credential challenge responses that might have been improperly obtained.

HttpWebRequest 是派生自 WebRequest 类的唯一类,可以使用 IWA。HttpWebRequest is the only class derived from WebRequest class that can potentially use IWA. FtpWebRequest 类只执行 FTP 明文身份验证。The FtpWebRequest class does only FTP clear text authentication. FileWebRequest 类不会执行任何身份验证。The FileWebRequest class doesn't perform any authentication.

应用程序可以通过多种方式获取 TransportContext 实例。There are several ways an application may get a TransportContext instance. 使用 SslStream 的应用程序可以使用 TransportContext 属性获取 TransportContextAn application that uses SslStream can get the TransportContext using the TransportContext property. 使用 HttpWebRequest 的应用程序可以使用 GetRequestStreamEndGetRequestStream 方法获取 TransportContextAn application that uses HttpWebRequest can get a TransportContext using the GetRequestStream or EndGetRequestStream methods.

构造函数

TransportContext()

创建 TransportContext 类的新实例。Creates a new instance of the TransportContext class.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetChannelBinding(ChannelBindingKind)

检索请求的通道绑定。Retrieves the requested channel binding.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetTlsTokenBindings()

获取传输安全层令牌绑定。Gets the transport security layer token bindings.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅