다음을 통해 공유


X509CertificateRecipientServiceCredential 클래스

정의

자체 식별을 위해 서비스에서 사용되는 인증서를 정의합니다.

public ref class X509CertificateRecipientServiceCredential sealed
public sealed class X509CertificateRecipientServiceCredential
type X509CertificateRecipientServiceCredential = class
Public NotInheritable Class X509CertificateRecipientServiceCredential
상속
X509CertificateRecipientServiceCredential

예제

다음 코드에서는 이 메서드를 사용해 서비스 자격 증명을 위한 인증서를 설정하는 방법을 보여 줍니다.

NetTcpBinding b = new NetTcpBinding();
b.Security.Mode = SecurityMode.Message;
Type c = typeof(ICalculator);
Uri a = new Uri("net.tcp://MyMachineName/tcpBase");
Uri[] baseAddresses = new Uri[] { a };
ServiceHost sh = new ServiceHost(typeof(MyService), baseAddresses);
sh.AddServiceEndpoint(c, b, "Aloha");
sh.Credentials.ServiceCertificate.SetCertificate(
    StoreLocation.LocalMachine,
    StoreName.My,
    X509FindType.FindByThumbprint,
    "af1f50b20cd413ed9cd00c315bbb6dc1c08da5e6");
sh.Open();
Dim b As New NetTcpBinding()
b.Security.Mode = SecurityMode.Message
Dim c As Type = GetType(ICalculator)
Dim a As New Uri("net.tcp://MyMachineName/tcpBase")
Dim baseAddresses() As Uri = { a }
Dim sh As New ServiceHost(GetType(MyService), baseAddresses)
sh.AddServiceEndpoint(c, b, "Aloha")
sh.Credentials.ServiceCertificate.SetCertificate(StoreLocation.LocalMachine, StoreName.My, X509FindType.FindByThumbprint, "af1f50b20cd413ed9cd00c315bbb6dc1c08da5e6")
sh.Open()

속성

Certificate

클라이언트에 응답할 때 해당 서비스를 나타내는 데 사용할 인증서를 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
SetCertificate(StoreLocation, StoreName, X509FindType, Object)

storeLocation, storeName, findTypefindValue와 같은 쿼리 매개 변수를 지정하여 서비스를 나타내기 위해 사용할 인증서를 지정합니다.

SetCertificate(String)

주체 고유 이름을 지정하여 서비스를 나타내는 데 사용할 인증서를 지정합니다.

SetCertificate(String, StoreLocation, StoreName)

주체 고유 이름, 인증서 저장소 이름 및 저장소 위치를 지정하여 서비스를 나타내는 데 사용할 인증서를 지정합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상