【发布时间】:2021-07-09 12:40:41
【问题描述】:
我有一个托管在 IIS 7.5 上的 ASP.NET 网站,如下所示:
我有“customwebsite.com”作为网站,其中我有两个 Web 应用程序 - uk 和 us - 因此我可以以 customwebsite.com/uk 和 customwebsite.com/us 的身份访问这些应用程序。
customwebsite.com 目录没有任何 web.config,只有两个文件夹用于 web 应用程序 us 和 uk。
us 和 uk web 应用程序都有各自的 web.config 并具有如下指定的表单身份验证:
<authentication mode="Forms">
<forms loginUrl="/static/login.aspx" name="login" timeout="20"/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
在这个路径:/static,有一个web.config,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</configuration>
当我点击我们应用程序的根 URL 时,网站正确加载,但如果我从英国加载,我收到如下错误:
我已经检查了文件夹安全性,并且所有必需的用户都已被授予权限,并且对于我们和英国的应用程序都是相同的。
我检查了 IIS 日志,下面是请求失败时的响应代码:401 0 0 1519 296
谁能帮我解决这个问题。
【问题讨论】:
标签: asp.net iis-7.5 forms-authentication