Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
以索赔模式托管在Sharepoint中的WCF服务_Wcf_Sharepoint_Claims - Fatal编程技术网

以索赔模式托管在Sharepoint中的WCF服务

以索赔模式托管在Sharepoint中的WCF服务,wcf,sharepoint,claims,Wcf,Sharepoint,Claims,我在声明模式下为Https配置了sharepoint服务器。我在sharepoint服务器中托管了WCF服务。此WCF服务器使用客户端证书进行身份验证 WCF服务使用BasicHttpBinding 在客户端,以下是绑定: BasicHttpBinding binding = new BasicHttpBinding(); binding.TransferMode = TransferMode.StreamedResponse; binding.Security.Mode = BasicHttp

我在声明模式下为Https配置了sharepoint服务器。我在sharepoint服务器中托管了WCF服务。此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客户端身份验证方案是匿名的。

看起来此配置可能有一定的相关性?注意模式-仅传输

WCF服务支持许多传输选项,但它们未完全集成到SharePoint中