同样的问题,只不过我客户端没有配置证书,帮我看一下,还需要哪里进行设置,WCF安全问题实在是头痛啊。。。。。
-------------------------------------------------------------
出错描述:
无法打开安全通道,因为与远程终结点的安全协商已失败。这可能是由于用于创建通道的 EndpointAddress 中不存在 EndpointIdentity 或错误指定了 EndpointIdentity。请确认由 EndpointAddress 指定或暗示的 EndpointIdentity 正确标识了远程终结点。
--------------------------------------------------------------
服务端Web.config配置
<bindings>
<wsHttpBinding>
<binding name="BindingConfigration" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647"/>
<security mode="Message">
<transport clientCredentialType="None"/>
<message clientCredentialType="None" negotiateServiceCredential="true" establishSecurityContext="true"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
-------------------------------------------------------------
客户端配置(代码配置,WinForm)
WSHttpBinding tmpBind = new WSHttpBinding();
tmpBind.Security.Mode = SecurityMode.Message;
tmpBind.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
tmpBind.Security.Message.ClientCredentialType = MessageCredentialType.None;
tmpBind.Security.Message.NegotiateServiceCredential = true;
tmpBind.Security.Message.EstablishSecurityContext = true;
-------------------------------------------------------------
把WCF发布到远程服务器就不行了。。。。
本机在HttpClientCredentialType.Windows验证下可以通过