2017-06-03 44 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

哦,是的,我的自定義錯誤頁面出現錯誤,我說得對,它工作。謝謝 –