2011-06-18 26 views
0

我有一個爲聲明模式中的Https配置的sharepoint服務器。我在SharePoint服務器中託管了一個WCF服務。此WCF服務器使用客戶端證書進行身份驗證。在聲明模式下在Sharepoint中託管的WCF服務

WCF服務使用BasicHttpBinding

在下面的客戶端是綁定:

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; 

我曾嘗試使用下面的調用還設置了客戶端證書:

base.ClientCredentials.ClientCertificate.SetCertificate(
    "CN=tempClientcert", StoreLocation.LocalMachine, StoreName.My 
); 

客戶端證書是正確的在客戶端和安裝服務器。

當我嘗試調用服務,我收到以下錯誤:

System.Security.MessageSecurityException : The HTTP request is unauthorized 
    with client authentication scheme 'Anonymous'. The authentication header 
    received from the server was 'NTLM' 

雖然我已經設置了客戶端憑證來證明,目前還不清楚,爲什麼跟它HTTP客戶端身份驗證方案匿名。

回答

0

WCF服務支持很多傳輸選項,它們沒有完全集成到SharePoint中