我有一个托管在 IIS 7.5 上的 ASP.NET 网站,如下所示:
我有“customwebsite.com”作为网站,其中有两个 Web 应用程序 - uk 和 us - 这样我就可以通过 customwebsite.com/uk 和 customwebsite.com/us 访问这些应用程序。
customwebsite.com 目录没有任何 web.config,并且只有两个用于 Web 应用程序 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>
When I hit the root URL for us application, the Website loads correctly but if I loads from uk, I got the error as below:
我已经检查了文件夹安全性,所有必需的用户都已被授予权限,并且对于美国和英国的应用程序都是相同的。
我检查了 IIS 日志,下面是失败时请求的响应代码: 401 0 0 1519 296
有人可以帮我解决这个问题吗?