【发布时间】:2012-03-21 12:31:46
【问题描述】:
使用 Cassini 但切换到 IIS Express。我最初的想法是我可以删除所有<system.web>,除了:
<authentication mode="Forms">
<forms loginUrl="/" />
</authentication>
我之前的customErrors 是这样设置的:
<customErrors mode="On" defaultRedirect="/ServerError">
<error statusCode="404" redirect="/NotFound" />
</customErrors>
当我切换到 IISExpress 时,我删除了这个 customErrors 元素。现在 404 不再重定向到我漂亮的“未找到”页面。
用于我的网站的 AppPool 是 Clr4IntegratedAppPool,这让我知道它没有使用 Classic。
为什么 IISExpress 如此依赖 system.web 而 IIS 7.5 使用 system.webServer?
【问题讨论】:
-
您使用的是哪个版本的 Visual Studio?这个question 可以提供帮助。
-
这很有趣,因为 IIS EXpress 基于使用 system.webserver 的 IIS7 代码库
标签: asp.net asp.net-mvc-3 iis-7.5 iis-express custom-errors