1

現在、WCF サービスに次のバインディングがあります。

  <basicHttpBinding>
    <binding name="BasicHttpEndpointBinding">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Ntlm" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>

  <webHttpBinding>
    <binding name="WebHttpEndpointBinding">
      <security mode="None" />
    </binding>
  </webHttpBinding>

対応するエンドポイント:

    <endpoint address=""
              binding="basicHttpBinding"
              bindingConfiguration="BasicHttpEndpointBinding"
              bindingNamespace="http://services.company.net/MyWcfService"
              contract="MyWcfService.Interface.IMyWcfService">
    </endpoint>
    <endpoint address="RestService"
              behaviorConfiguration="restServiceBehavior"
              binding="webHttpBinding"
              bindingConfiguration="WebHttpEndpointBinding"
              contract="MyWcfService.Interface.IMyWcfService" />
  </service>

アイデアは、NTLM 認証を要求するために「BasicHttpEndpointBinding」バインディングを呼び出すクライアントと、「WebHttpEndpointBinding」を呼び出すクライアントが匿名で実行できるようにすることです (jQuery を介した RESTful 呼び出し)。

これは私のマシンでは機能しているように見えますが、IIS 7.5 がホストされている環境では可能でしょうか?

ありがとう。

4

2 に答える 2

1

endpointごとに別途必要ですbinding

既存の をコピーしてendpointから、 および を更新しaddressますbinding

/{myService}

于 2013-01-26T02:55:15.963 に答える
0

これは、匿名および Windows 認証が有効になっている IIS で機能します。

于 2013-01-28T22:02:11.940 に答える