Which code segment should you use?

You are maintaining a Windows Communication Foundation (WCF) service that uses a
custom UserNamePassword class to authenticate clients. The service certificate is hosted
in the deployment server store for trusted root certificate authorities and has a Subject value
of TaxServiceKey. Other service certificates hosted on the server also use TaxServiceKey
as a Subject value. You need to ensure that the service identifies itself with a certificate

whose subject name and distinguished names are TaxServiceKey. Which code segment
should you use?

You are maintaining a Windows Communication Foundation (WCF) service that uses a
custom UserNamePassword class to authenticate clients. The service certificate is hosted
in the deployment server store for trusted root certificate authorities and has a Subject value
of TaxServiceKey. Other service certificates hosted on the server also use TaxServiceKey
as a Subject value. You need to ensure that the service identifies itself with a certificate

whose subject name and distinguished names are TaxServiceKey. Which code segment
should you use?

A.
HostInstance.Credentials.ServiceCertificate.SetCertificate (StoreLocation.LocalMachine,
StoreName.Root, X509FindType.FindBySubjectDistinguishedName, “CN=TaxServiceKey”)

B.
HostInstance.Credentials.ServiceCertificate.SetCertificate (StoreLocation.LocalMachine,
StoreName.My, X509FindType.FindBySubjectDistinguishedName, “CN=TaxServiceKey”)

C.
HostInstance.Credentials.ServiceCertificate.SetCertificate (StoreLocation.LocalMachine,
StoreName.AuthRoot, X509FindType.FindBySubjectName, “CN=TaxServiceKey”)

D.
HostInstance.Credentials.ServiceCertificate.SetCertificate (StoreLocation.LocalMachine,
StoreName.My, X509FindType.FindBySubjectName, “CN=TaxServiceKey”)



Leave a Reply 0

Your email address will not be published. Required fields are marked *