2017-06-03 74 views
1

在virto商业店面的customErrors中,存在defaultRedirect =“〜/ ServerMaintenance.aspx”。 所以在statusCode =“500”中显示ServerMaintenance。 但在的StatusCode =“500”我需要显示C500.aspx 我改变webconfig到virto商业店面的自定义错误页面

<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/ServerMaintenance.aspx"> 
<error statusCode="500" redirect="~/Status/C500.aspx"/> 
</customErrors> 

但在的StatusCode =“500”不显示C500.aspx,并表演和展示页面出现以下错误:

Server Error in '/' Application. 

Runtime Error 

Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated. 

我的错误在哪里?

回答

2

响应中的消息表示在自定义错误页面上有错误,这就是为什么你看不到它。尝试关闭自定义错误

<system.web> 
    <customErrors mode="Off"... 

并直接向C500.aspx发出请求 - 您应该看到它有什么问题。

+0

哦,是的,我的自定义错误页面出现错误,我说得对,它工作。谢谢 –