WCF service hosted in Sharepoint in Claims mode
-
29-10-2019 - |
Вопрос
I have a sharepoint server configured for Https in Claims mode. I have hosted a WCF Service in the sharepoint server. This WCF server uses client certificate for authentication.
The WCF service uses BasicHttpBinding
.
On the client side following is the binding:
BasicHttpBinding binding = new BasicHttpBinding();
binding.TransferMode = TransferMode.StreamedResponse;
binding.Security.Mode = BasicHttpSecurityMode.Transport;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Ntlm;
I have also set the client certificate using the following call:
base.ClientCredentials.ClientCertificate.SetCertificate(
"CN=tempClientcert", StoreLocation.LocalMachine, StoreName.My
);
The client certificate is correctly setup in the client and the server.
When I try to invoke the service, I get the following error:
System.Security.MessageSecurityException : The HTTP request is unauthorized
with client authentication scheme 'Anonymous'. The authentication header
received from the server was 'NTLM'
Though i have set the client credential to Certificate, it is unclear as to why it is saying http client authentication scheme is Anonymous.
Нет правильного решения
Не связан с StackOverflow