0

我正在尝试将我的 WCF 服务配置为在具有集成安全性的 HTTPS 上运行,但无论我尝试什么,我总是会遇到相同的错误:

The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'BasicHttpBinding' ('Anonymous').  Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly

我的配置看起来像:

  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
      <serviceAuthenticationManager authenticationSchemes="IntegratedWindowsAuthentication"/>
    </behavior>
  </serviceBehaviors>

<protocolMapping>
    <add scheme="https" binding="basicHttpBinding" bindingConfiguration="myHttpsBinding" />
</protocolMapping>    

 <basicHttpBinding>
   <binding name="myHttpsBinding">
      <security mode="Transport">
        <transport clientCredentialType="InheritedFromHost" />
      </security>
    </binding>
 </basicHttpBinding>
</bindings>

我已经尝试过 wsHttpBinding、basicHttpsBinding 等,但我总是遇到同样的错误。

4

0 回答 0