Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

TcpTransportSecurity.ClientCredentialType Property

Gets or sets the type of client credential used for authentication.

Namespace: System.ServiceModel
Assembly: System.ServiceModel (in system.servicemodel.dll)

public TcpClientCredentialType ClientCredentialType { get; set; }
/** @property */
public TcpClientCredentialType get_ClientCredentialType ()

/** @property */
public void set_ClientCredentialType (TcpClientCredentialType value)

public function get ClientCredentialType () : TcpClientCredentialType

public function set ClientCredentialType (value : TcpClientCredentialType)

Not applicable.

Property Value

Returns the TcpClientCredentialType.

The return value can be one of the following enumeration members:

The following code shows how to access and set this property.

NetTcpBinding b = new NetTcpBinding();
b.Security.Mode = SecurityMode.Transport;
b.Security.Transport.ClientCredentialType = TcpClientCredentialType.Certificate;
EndpointAddress a = new EndpointAddress("net.tcp://contoso.com/TcpAddress");
ChannelFactory<ICalculator> cf = new ChannelFactory<ICalculator>(b, a);
cf.Credentials.ClientCertificate.SetCertificate(
    StoreLocation.LocalMachine,
    StoreName.My,
    X509FindType.FindByThumbprint,
    "0000000000000000000000000000000000000000");

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.