2011-06-18 7 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に完全に統合されていません。