This documentation is archived and is not being maintained.

TransportContext.GetChannelBinding Method

Retrieves the requested channel binding.

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

Public MustOverride Function GetChannelBinding ( _
	kind As ChannelBindingKind _
) As ChannelBinding
Dim instance As TransportContext 
Dim kind As ChannelBindingKind 
Dim returnValue As ChannelBinding 

returnValue = instance.GetChannelBinding(kind)


Type: System.Security.Authentication.ExtendedProtection.ChannelBindingKind

The type of channel binding to retrieve.

Return Value

Type: System.Security.Authentication.ExtendedProtection.ChannelBinding
The requested ChannelBinding, or Nothing if the channel binding is not supported by the current transport or by the operating system.


kind is must be Endpoint for use with the TransportContext retrieved from the TransportContext property.

The possible values for the kind parameter are Endpoint or Unique.

If an application attempts to retrieve the channel binding token (CBT) from the TransportContext property using the GetChannelBinding method and the ChannelBindingKind is not Endpoint, then the HttpListenerRequest will throw NotSupportedException. The HttpListenerRequest overrides the GetChannelBinding method with an internal implementation

Windows 7, Windows Server 2008 R2

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

.NET Framework

Supported in: 3.5 SP1