Freigeben über


Client Channel Properties

This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the Windows Communication Foundation (WCF).

The following table shows the client channel properties that can be specified.

Property Description Types that support this property

allowAutoRedirect

A Boolean value that indicates whether the automatic handling of server redirects is enabled.

HttpChannel

HttpClientChannel

clientConnectionLimit

An integer that indicates how many connections can be simultaneously opened to a given server. The default is 2.

HttpChannel

HttpClientChannel

connectionGroupName

A string that specifies the name that to be used as the connection group name on the server if the unsafeAuthenticatedConnectionSharing value is set to true. This property is ignored if unsafeAuthenticatedConnectionSharing is not set to true. If specified, make sure that this name maps to only one authenticated user.

This property is supported only by version 1.1 or greater of the .NET Framework on the following platforms: Windows 98, Windows NT 4.0, Windows Me, Windows 2000, Windows XP Home Edition, Windows XP Professional, and the Windows Server 2003 family.

HttpChannel

HttpClientChannel

connectionTimeout

An integer that specifies the number of milliseconds to wait for a successful connection. 0 or -1 indicates an infinite timeout period. The default is Infinite.

IpcChannel

IpcClientChannel

credentials

An object that implements the ICredentials interface that represents the identity of the client.

HttpChannel

HttpClientChannel

domain

A string that specifies a domain name to be used, in conjunction with the user name specified by username and the password specified by password, when authenticating to a server channel.

HttpClientChannel

TcpClientChannel

password

A string that specifies a password to be used, in conjunction with the user name specified by username and the domain specified by domain, when authenticating to a server channel.

HttpClientChannel

TcpClientChannel

proxyName

A string that specifies the name used by the proxy when making calls to the remote server. By default, the host name of the client computer is used.

HttpChannel

HttpClientChannel

proxyPort

An integer that specifies the port number from which the proxy makes calls to the remote server. By default, an available, unprivileged port is chosen at runtime.

HttpChannel

HttpClientChannel

retryCount

An integer that specifies the number of times that the client repeats an attempted remote call that initially fails. The default is 1.

TcpClientChannel

servicePrincipleName

A string that specifies the servicePrincipalName for Kerberos authentication. The default value is null.

HttpChannel

HttpClientChannel

TcpChannel

TcpClientChannel

socketCachePolicy

A member of the SocketCachePolicy enumeration that specifies whether the time specified by the socketCacheTimeout property is measured from the time a socket was last used or from the time a socket was created. The default is Default.

TcpClientChannel

socketCacheTimeout

An integer that specifies the time, in seconds, after which a socket is removed from the cache maintained by a TcpClientChannel object. The default is five seconds.

TcpClientChannel

timeout

An integer that specifies the number of milliseconds to wait before a request times out. 0 or -1 indicates an infinite timeout period. The default is Infinite.

HttpChannel

HttpClientChannel

TcpChannel

TcpClientChannel

tokenImpersonationLevel

A value of type TokenImpersonationLevel. This property specifies how the client is authenticated with the server. The default is None, unless the secure property is set to true, in which case the default is Identification.

TcpChannel

TcpClientChannel

unsafeAuthenticatedConnectionSharing

A Boolean value that indicates whether to allow high-speed NTLM-authenticated connection sharing. If this value is set to true, the connectionGroupName value must map to only one authenticated user. This property is ignored if the useAuthenticatedConnectionSharing value is set to true.

This property is supported only by version 1.1 or greater of the .NET Framework on the following platforms: Windows 98, Windows NT 4.0, Windows Me, Windows 2000, Windows XP Home Edition, Windows XP Professional, and Windows Server 2003.

HttpChannel

HttpClientChannel

useAuthenticatedConnectionSharing

A Boolean value that indicates whether the server channel reuses authenticated connections rather than authenticate each incoming call. By default, this value is set to true if the useDefaultCredentials value is also set to true; otherwise, the value is set to false, which means that each call is authenticated if the server requires authentication. This also applies to the programmatic equivalent, which is achieved either by creating an object that implements IDictionary, setting the credentials property to CredentialCache.DefaultCredentials, and passing that value to the channel sink, or by using the IDictionary returned from the ChannelServices.GetChannelSinkProperties method.

This name/value pair is supported only by version 1.1 or greater of the .NET Framework on the following platforms: Microsoft Windows 98, Windows NT 4.0, Windows Millennium Edition (Windows Me), Windows 2000, Windows XP Home Edition, Windows XP Professional, and Windows Server 2003.

HttpChannel

HttpClientChannel

useDefaultCredentials

A Boolean value that specifies whether to present credentials for the identity associated with the current thread when authenticating to a server channel.

HttpChannel

HttpClientChannel

username

A string that specifies a user name to be used, in conjunction with the password specified by password and the domain specified by domain, when authenticating to a server channel.

HttpClientChannel

TcpClientChannel

NoteNote

On Windows 98 and Windows Me, there is no security ID to identify the authentication connection group name. Therefore, on these platforms there is one connection group name.

NoteNote

If you want your application to pass the ICredentials implementation or explicit username, password, and domain values in the HttpClientChannel properties, you can enable authentication connection sharing by also setting the unsafeAuthenticatedConnectionSharing property to true and setting the connectionGroupName property, making sure that the connectionGroupName value maps to only one authenticated user.

See Also

Tasks

How to: Configure a Channel in a Configuration File
How to: Configure a Channel Programmatically

Reference

Remoting Settings Schema

Concepts

Configuration of Remote Applications
Remote Object Configuration
Remote Object Configuration