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