0
我已经尝试了一些方法来部署我的自定义错误页(如error.aspx)到我的网站重定向到自定义错误页:如何配置IIS访问不支持的扩展名,当
- 新增的customErrors:
<customErrors mode="On" defaultRedirect="error.aspx" />
- 新增httpError:
<httpErrors> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" prefixLanguageFilePath="" path="error.aspx" responseMode="ExecuteURL" /> </httpErrors>
目前,我可以在这个URL指向我的自定义错误页:
http://test.localdev.net/random_text.aspx
但是,我失败的那种URL(不支持扩展)的,对于这些网址,IIS将使用自己的404页:
http://test.localdev.net/Default.random
谁能帮我解决这个问题?
感谢
是的,IIS 7的应用程序池处于集成模式。 –
尝试添加existingResponse =“替换”到webServer/httpErrors – AbdElRaheim