asp.net – 为什么IIS Express使用而不是?
使用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不再重定向到我漂亮的“NotFound”页面了. 用于我的网站的AppPool是Clr4IntegratedAppPool,它让我知道它不使用Classic. 为什么IISExpress如此依赖system.web而IIS 7.5使用system.webServer? 解决方法
好吧,我尝试了一些不同的东西:
>将existingResponse更改为PassThrough,如here所示 < httpErrors errorMode =“Custom”existingResponse =“Replace”> 不! >如评论here中所述,设置TrySkipIisCustomErrors = false Notta! 我最终通过简单地将existingResponse更改为Replace来使其工作. >谁知道! 这就是system.webServer现在的样子: <httpErrors errorMode="Custom" existingResponse="Replace"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" path="/NotFound" responseMode="ExecuteURL" /> <remove statusCode="500" subStatusCode="-1" /> <error statusCode="500" path="/ServerError" responseMode="ExecuteURL" /> </httpErrors> 为什么这个解决方案没有任何意义
http://blogs.iis.net/ksingla/archive/2008/02/18/what-to-expect-from-iis7-custom-error-module.aspx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net – 处理可变数量的表单字段
- 文件无刷新上传(swfUpload与uploadify)
- asp.net – 在ajax调用中传递参数
- 每组ASP.Net中继器头(即月份)
- asp.net-mvc – 属性级验证错误阻碍了类级验证的验证
- asp.net-mvc – 文件输入MVC 3所需的客户端验证
- asp.net-mvc – 重新安装Microsoft Visual Studio Asp.net
- asp.net – 如何加速Visual Studio Webserver(Cassini)?
- asp.net-mvc-3 – MVC默认重定向错误页面并不总是显示
- asp.net-mvc – Automapper和Windsor的问题
- asp.net-mvc – 为什么DisplayFormat DataFormat
- asp.net-web-api – 标题中的API密钥与swashbuck
- asp.net – 让visual studio autoformat成为我的
- ASP.NET相对路径
- ado.net – ASP.NET:如何从web.config Connecti
- asp.net-mvc – 使用ASP.NET MVC的SEO URL
- asp.net – Umbraco 7:无法加载类型Umbraco.Web
- .net – 如何将包含日期的字符串转换为其他格式?
- asp.net-mvc – 模型和视图模型之间的区别
- asp.net-mvc – 如何将行的模型从Kendo Grid传递