在某些情况下,托管商可能需要将“applicationhost.config”文件中的特定设置委派给客户,而不委派整个部分,httpErrors 部分中的 errorMode 设置就是其中之一,另一个是ASP 部分中的 scriptErrorSentToBrowser 设置。 出于故障排除目的,托管商的客户可能希望在远程客户端中显示详细错误。 若要启用该功能,托管商需要锁定除...
在某些情况下,托管商可能需要将“applicationhost.config”文件中的特定设置委派给客户,而不委派整个部分,httpErrors 部分中的 errorMode 设置就是其中之一,另一个是ASP 部分中的 scriptErrorSentToBrowser 设置。 出于故障排除目的,托管商的客户可能希望在远程客户端中显示详细错误。 若要启用该...
若要委派 errorMode 設定: 透過overrideModeDefault 開啟並變更 < 區段名稱=「HTTPErrors」 overrideModeDefault=「Deny」 / 元素,以允許透過 overrideModeDefault%windir%\system32\inetsrv\config\applicationhost.config中的 > applicationhost.config區段委派<httpErrors>,如下所示: ...
errorMode属性可以是下列值之一;默认值为DetailedLocalOnly。 值说明 DetailedLocalOnly如果请求来自本地计算机,则返回详细的错误信息,如果请求来自外部计算机,则返回自定义错误消息。 数值为0。 Custom将模块或服务器生成的错误替换为指定的自定义页面。 此模式可用于向最终用户提供更友好的错误消息。
<httpErrors errorMode="Detailed" /> 其中,errorMode属性指示如何处理HTTP错误。详细模式(Detailed)是最详细的错误模式,它将返回一个包含服务器响应头(Status Line)和HTTP体(HTTP Body)的错误页面。在详细模式下,服务器将返回一个包含服务器响应头和HTTP体的错误页面,客户端可以查看详细的错误信息,以帮助用户诊断问...
<httpErrorserrorMode="Detailed"/> 其中,errorMode属性指示如何处理HTTP错误。详细模式(Detailed)是最详细的错误模式,它将返回一个包含服务器响应头(Status Line)和HTTP体(HTTP Body)的错误页面。在详细模式下,服务器将返回一个包含服务器响应头和HTTP体的错误页面,客户端可以查看详细的错误信息,以帮助用户诊断问题。
errorModeOptional enum attribute. Specifies whether HTTP errors are enabled. TheerrorModeattribute can be one of the following values; the default isDetailedLocalOnly. Table 4 existingResponseOptional enum attribute. Specifies what happens to an existing response when the HTTP status code is an error...
errorModeOptional enum attribute. Specifies whether HTTP errors are enabled. TheerrorModeattribute can be one of the following values; the default isDetailedLocalOnly. Table 4 existingResponseOptional enum attribute. Specifies what happens to an existing response when the HTTP status code is an error...
Note:ExecuteURL只能用于同一个应用下的ASP.NET文件,如果想要重定向到另一个应用,或者一个完全不一样的完整的URL,我们需要将responseMode设为Redirect。 <httpErrors errorMode="Custom"existingResponse="Replace"> <clear /> <error statusCode="404"path="http://www.bing.com"responseMode="Redirect"/> ...
<configuration> <system.webServer> <httpErrors errorMode="Custom"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" path="/errorpages/404.html" responseMode="File" /> </httpErrors> </system.webServer> </co...