TcpTransportSecurity.ClientCredentialType 속성

정의

인증에 사용되는 클라이언트 자격 증명 형식을 가져오거나 설정합니다.

public:
 property System::ServiceModel::TcpClientCredentialType ClientCredentialType { System::ServiceModel::TcpClientCredentialType get(); void set(System::ServiceModel::TcpClientCredentialType value); };
public System.ServiceModel.TcpClientCredentialType ClientCredentialType { get; set; }
member this.ClientCredentialType : System.ServiceModel.TcpClientCredentialType with get, set
Public Property ClientCredentialType As TcpClientCredentialType

속성 값

TcpClientCredentialType

TcpClientCredentialType를 반환합니다.

예제

다음 코드에서는 이 속성에 액세스하여 해당 속성을 설정하는 방법을 보여 줍니다.

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");
Dim b As NetTcpBinding = New NetTcpBinding()
b.Security.Mode = SecurityMode.Transport
b.Security.Transport.ClientCredentialType = TcpClientCredentialType.Certificate
Dim a As New EndpointAddress("net.tcp://contoso.com/TcpAddress")
Dim cf As ChannelFactory(Of ICalculator) = New ChannelFactory(Of ICalculator)(b, a)
cf.Credentials.ClientCertificate.SetCertificate( _
    StoreLocation.LocalMachine, _
    StoreName.My, _
    X509FindType.FindByThumbprint, _
    "0000000000000000000000000000000000000000")

설명

반환 값은 다음 열거형 멤버 중 하나일 수 있습니다.

적용 대상