Another exception occurred while executing the custom error

Posted by Community Admin on 04-Aug-2018 00:37

Another exception occurred while executing the custom error page

All Replies

Posted by Community Admin on 22-May-2014 00:00

In Sitefinity 7.0, I'm having trouble creating a custom error page with redirectMode="ResponseRewrite".

<customErrors mode="RemoteOnly" redirectMode="ResponseRewrite" defaultRedirect="~/Error/500.html"><error statusCode="500" redirect="~/Error/500.html" /></customErrors>

 It works perfectly fine without the Rewrite mode, but redirecting is unacceptable. When I use Rewrite, I get the following error message: "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."

I am testing my 500 error by throwing an Exception from a Form. I have a custom MyFormsControl object, which inherits from the built-in Telerik.SitefinityModules.Forms.Web.UI.FormsControl. I have tried to throw the Exception both from the IntializeControls method and a BeforeFormSave event handler. I have confirmed in the server event log and the Sitefinity Error log that the only exception is the test exception that I'm throwing, so I don't know why it says that another occurred.

What should I do differently?

Posted by Community Admin on 26-May-2014 00:00

Hi David,

Are you passing any information to the server with the form you are testing? Have you tried with a simple user control on a page to see if it will behave the same way? Also can you provide the stack trace of the unwanted exception?

Regards,
Pavel Benov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 28-May-2014 00:00

No, I am not passing any information to the server. (E.g., My first test involves throwing the exception during InitializeControls, which executes during initial form display, prior to any submission/postback attempt.)

Also, the unwanted exception does not appear in the event log, so I cannot get a stack trace. The IIS response to my web browser simply tells me that there was an another exception while executing the custom error page for the first exception.

This thread is closed