Iis 7 IIS 7中的自定义HTTP错误
我正在尝试处理我的web应用程序中的403和404错误。我已经在我的服务器上阅读并应用了。IIS7 manager通过将my web.config编辑为:Iis 7 IIS 7中的自定义HTTP错误,iis-7,custom-errors,Iis 7,Custom Errors,我正在尝试处理我的web应用程序中的403和404错误。我已经在我的服务器上阅读并应用了。IIS7 manager通过将my web.config编辑为: <httpRedirect enabled="false" destination="/MySite" httpResponseStatus="Temporary" /> <httpErrors> <remove statusCode="404" subStatusCode="-1" />
<httpRedirect enabled="false" destination="/MySite" httpResponseStatus="Temporary" />
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="403" subStatusCode="-1" />
<error statusCode="403" prefixLanguageFilePath="" path="/mySite/Error.aspx" responseMode="ExecuteURL" />
<error statusCode="404" prefixLanguageFilePath="" path="/mySite/Error.aspx" responseMode="ExecuteURL" />
</httpErrors>
它确实可以处理像这样的请求,但无法处理。它似乎只能处理aspx请求
我还尝试在system.web节点中添加此配置
有人知道a)为什么IIS7只处理aspx和b)有人知道如何处理像这样的通用需求吗
谢谢你,比尔参见我的回复: 看起来您可能需要设置
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>