C# WCF over HTTPS,具有集成身份验证

C# WCF over HTTPS,具有集成身份验证,c#,wcf,C#,Wcf,我正在尝试将我的WCF服务配置为通过集成安全性的HTTPS运行,但无论我尝试什么,都会遇到相同的错误: The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'BasicHttpBinding' ('Anonymous'). Please ensure that the SecurityM

我正在尝试将我的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等,但总是出现同样的错误。

我无法复制。。将您的行为、协议映射和绑定复制到新的WCF服务,在IIS中启用了Windows身份验证,对我来说运行良好。以下链接可能会对您有所帮助:1。2.检查此链接-