我最近创建了一个利用 Windows 身份验证的 MVC 应用程序。我有一个名为“EventReceivers”的子目录,希望允许匿名访问。我已经使用正确的位置元素更新了我的 web.config,并且在带有 IIS8 的 Windows Server 2012 上一切正常。但是,当我将同一个项目部署到 Azure 包时,EventReceivers 目录中的文件会提示用户输入凭据。下面是我的 web.config 片段。有什么建议么?
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows" />
<authorization>
<allow verbs="OPTIONS" users="*" />
<deny users="?" />
</authorization>
</system.web>
<location path="EventReceivers">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>