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.My, X509FindType.FindBySubjectName, “CN=TaxServiceKey”);
B.
HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine,
StoreName.AuthRoot, X509FindType.FindBySubjectName, “CN=TaxServiceKey”);
C.
HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine,
StoreName.My, X509FindType.FindBySubjectDistinguishedName, “CN=TaxServiceKey”);
D.
HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine,
StoreName.Root, X509FindType.FindBySubjectDistinguishedName, “CN=TaxServiceKey”);