提问人:Freeman Helmuth 提问时间:11/16/2023 最后编辑:Freeman Helmuth 更新时间:11/18/2023 访问量:31
IIS URL 重写:根站点仍需要身份验证
IIS URL Rewrite: Root Site Is Still Requiring Authentication
问:
在 IIS 10 上,我在 https://sub.example.com 有一个网站,该网站的根目录上运行一个 .NET 应用,需要身份验证。
我想 https://sub.example.com/MyDir 重写 http://internalserver/MyDir。但是在IIS重写方面没有成功。
我安装了 ARR 和 Rewrite 模块 - 我已经重新安装了重写模块。
内部服务器不需要对“MyDir”进行任何身份验证,但问题是根站点仍在强制进行身份验证。 如何防止根站点要求身份验证?
我试图遵循这篇文章,但没有成功:允许对 web.config 中的单个文件夹进行匿名身份验证?
编辑:匿名身份验证已打开,以下是 web.config 中与授权相关的部分
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<px.core>
<formsAuth loginUrl="Frames/Login.aspx" timeout="120" />
<multiAuth>
<locations>
<clear />
</locations>
</multiAuth>
</px.core>
<location inheritInChildApplications="false">
<system.web>
<authentication mode="None" />
<authorization>
<!--<allow roles="Administrator"/>-->
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="Images">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="App_Themes/GetCSS.aspx">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="App_Themes/Default">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="App_Themes/Default/Images">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="Api">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="odata">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="odatav4">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="Soap">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="Export">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="Files">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
<location path="Frames/Outlook">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Frames/PasswordRemind.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Frames/LoginRemind.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Frames/Error.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Frames/Maintenance.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Frames/PaymentConnector.html">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="calendarSync.ics">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Handlers">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="favicon.ico">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="EULA">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="robots.txt">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="CurrentWorkOrder">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
答: 暂无答案
评论