asp.net - IIS URL 重写 : 403 - Forbidden: Access is denied

标签 asp.net iis url-rewriting

我安装了 IIS URL Rewrite 2.0并添加规则将所有 http 链接重定向到 https。这是我的 Web.Config代码:

 <rewrite>
        <rules>
            <rule name="REdirect To HTTPS" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTPS}" pattern="^OFF$" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
            </rule>
        </rules>
    </rewrite>

一切看起来都很好。但是当我使用 http 访问我的网站时,它会抛出 403 错误。
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.

IIS 7.5 启用了 TLS 1.0。

我在哪里可以获得更多关于 403 错误类型的信息?

最佳答案

在 IIS 中启用了 SSL。我刚看完 somewhere在 SSL 设置 Require SSL使用 URL Rewrite 2.0 时需要取消选中。

我取消选择 Require SSL并单击应用。它现在工作正常。

关于asp.net - IIS URL 重写 : 403 - Forbidden: Access is denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37613359/

相关文章:

asp.net - 在 ASP Classic 中注册 .NET DLL 以获得 COM 可见性

asp.net - 使用WCAT对ASP.NET/IIS进行压力测试

php - 使用 htaccess 使用文件夹重写和重定向 url

php - 如何从 cakephp 的 url 中删除操作名称?

iis - 经典 ASP "Down for Maintenance"页面

php - htaccess 重写 url,以便仅在根目录而不是子目录中删除 php 扩展

c# - 向 session 添加值时出现 NullReferenceException

html - 为什么我的模态不工作不显示,我想把它发送到代码后面

asp.net - WCF 服务契约将被 XML 和 Json 序列化

iis - 在 IIS/Windows Server 2016 上从 RavenDB 获取有关 WebSocket 的错误