MapPageRoute 在 iis7 上不工作(但在 iis6 上工作)

发布于 2024-10-03 09:36:19 字数 247 浏览 1 评论 0原文

我的网站在 iis6 上运行良好,如下所示: http://93.115.250.xxx/

我最近尝试将其迁移到 iis7,经过一番努力,我现在可以看到起始页面,但是通过 mappageroute 重写的所有 url 都会给出 404,如您在此处看到的:94.75.xxx.xxx

关于 iis7 为何尝试的任何想法访问物理文件并忽略页面路由?

My WebSite runs fine on iis6, as you can see here: http://93.115.250.xxx/

I recently tried to migrate it to iis7, and after a lot of hussle I now can see the starting page, but all urls rewritten through mappageroute give a 404 as you can see here: 94.75.xxx.xxx

Any ideas as to why iis7 is trying to access a physical file and ignores the pageroute?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

⊕婉儿 2024-10-10 09:36:19

我目前正在混合环境中编程。我的 alpha 服务器是 Server2008,beta 和生产仍然是 2003。您需要修改配置文件以具有包含以下条目的 system.webServer 节点:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

我不确定这是否适用于您的实例,但我的应用程序需要登录接受可从重写的目录获取的公开图像文件。不要忘记在路由映射的位置添加一个 except:

   <location path="{target path}">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>
    </location>

I am currently programming in a mixed environment. My alpha server is Server2008, beta and production are still 2003. You need to modify the config file to have system.webServer node with the following entry:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

I am not sure if this is applicable in your instance, but my application required log-in accept for publicly available image files available from a re-written directory. Don't forget to add an except to where the route is mapped:

   <location path="{target path}">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>
    </location>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文