【问题标题】:IIS Express expecting IntegratedWindowsAuthentication, how do I enable Anonymous Authentication?IIS Express 需要 IntegratedWindowsAuthentication,如何启用匿名身份验证?
【发布时间】:2014-09-30 18:16:53
【问题描述】:

我有一个具有这种配置的 WCF 服务:

<system.serviceModel>
  <behaviors>
    <serviceBehaviors>
      <behavior name="">
        <serviceMetadata httpGetEnabled="true"/>
        <serviceDebug includeExceptionDetailInFaults="false"/>
      </behavior>
    </serviceBehaviors>
  </behaviors>
  <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>

它以前可以正常工作,但一定有什么改变了,因为当我现在尝试运行它时,我得到了这个错误:

主机上配置的认证方案 ('IntegratedWindowsAuthentication') 不允许那些在 绑定“BasicHttpBinding”(“匿名”)。

我已尝试删除 IIS Express 配置文件,希望它能够将自身重置为其默认配置(我假设其中包括匿名身份验证),但我仍然遇到同样的错误。

错误是否在其他地方,我需要显式重新配置 IIS Express,还是我完全遗漏了其他东西?

【问题讨论】:

    标签: wcf authentication iis-express


    【解决方案1】:

    我设法解决了。即使我重置了 IIS Express 配置,由于某种原因,它仍然在此应用程序上禁用了匿名身份验证。向下滚动到配置文件的底部后,我发现了以下条目:

    <location path="MyApplication">
        <system.webServer>
            <security>
                <authentication>
                    <anonymousAuthentication enabled="false" />
                    <windowsAuthentication enabled="true" />
                </authentication>
            </security>
        </system.webServer>
    </location>
    

    我启用了应用程序工作的匿名身份验证。

    【讨论】:

      猜你喜欢
      • 2013-05-17
      • 1970-01-01
      • 2019-01-09
      • 2020-12-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多