客户端身份验证方案禁止HTTP请求'匿名'在wsDualHttpBinding

时间:2016-04-05 10:19:07

标签: wcf app-config wsdualhttpbinding transport-security

我有一个客户端 - 服务器应用程序。我的服务器站点在IIS上 我的客户端App.config是:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsDualHttpBinding>
                <binding name="WSDualHttpBinding_IService" />
            </wsDualHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8083/Service.svc"                  
                      binding="wsDualHttpBinding"
                      bindingConfiguration="WSDualHttpBinding_IService"    
                      contract="ServiceReference.IService"
                      name="WSDualHttpBinding_IService">
            </endpoint>
        </client>
   </system.serviceModel>

当我按下我的应用程序上的按钮时 - 我收到以下错误:

http请求未经授权使用客户端身份验证方案&#39;匿名&#39;

似乎为了解决这个问题,我必须使用以下代码:

<security mode="TransportCredentialOnly">
  <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
  <message clientCredentialType="UserName" algorithmSuite="Default" />
</security>

但是,由于wsDualHttpBinding不支持传输安全性,我该怎么办?
也许IIS本身有任何声明吗?

0 个答案:

没有答案