2

我有一个客户端-服务器应用程序。我的服务器站点在 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 请求未经授权,客户端身份验证方案为“匿名”。

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

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

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

4

0 回答 0