This documentation is archived and is not being maintained.

TransportContext Class

The TransportContext class provides additional context about the underlying transport layer.


Namespace:  System.Net
Assembly:  System (in System.dll)

public ref class TransportContext abstract

The TransportContext type exposes the following members.

Protected methodTransportContextCreates a new instance of the TransportContext class

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetChannelBindingRetrieves the requested channel binding.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

The TransportContext class is used with classes in the System.Security.Authentication.ExtendedProtection namespace to provide support for authentication using extended protection for applications.

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. 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 is the only class derived from WebRequest class that can potentially use IWA. The FtpWebRequest class does only FTP clear text authentication. The FileWebRequest class doesn't perform any authentication.

There are several ways an application may get a TransportContext instance. An application that uses SslStream can get the TransportContext using the TransportContext property. An application that uses HttpWebRequest can get a TransportContext using the GetRequestStream or EndGetRequestStream methods.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.