+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Another exception occurred while executing the custom error page

Another exception occurred while executing the custom error page

3 posts, 0 answered
  1. David Lamb
    David Lamb avatar
    10 posts
    Registered:
    02 Oct 2009
    22 May 2014
    Link to this post

    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?

  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    26 May 2014
    Link to this post
    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
     
  3. David Lamb
    David Lamb avatar
    10 posts
    Registered:
    02 Oct 2009
    28 May 2014 in reply to Pavel Benov
    Link to this post

    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.

3 posts, 0 answered