Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Show custom error page when an exception is thrown on server side (while handling a postback)Show custom error page when an exception is thrown on server side (while handling a postback)
Previous
 
Next
New Post
3/29/2012 6:06 AM
 

Hi,

how do I customize the way DNN handles server side errors that occurs on a postback with a complete page reload?

I've created a DNN page and put a module on that page. The module contains one form. After submitting the form a postback to the server and a complete page reload is performed. When an exceptions is thrown while handling the postback, the page is reloaded and a red (default) DNN message is shown on top of the page:

"A critical error has occurred.An unexpected error has occurred"

And the URL changes to:
http://localhost:8080/Default.aspx?tabid=[,,,]&error=An%20unexpected%20error%20has%20occurred&content=0

Is there a way to configure the URL the client is redirected to in case of an exception is thrown? I would like to set up a default InternalServer error page (like /ErrorInternalServerError.aspx) that is shown to the user in case of any (server side) error.

I tried to set up <customErrors> tag in the Web.config for the error page, but this only worked for 404 errors (page not found).

 Thanks in advance.

 
New Post
5/1/2012 6:16 PM
 

Hello,

no, the page is not configurable however you can set whether or not custom errors are shown by logging in as host and going to host->host settings, expand appearance and check/uncheck "use custom error messages" - if you disable custom error messages then dotnetnuke will not catch the exeception and it will bubble up to the application level at which point it will respect the web.config customErrors settings i.e. you could add a custom error for a 500 level exception and handle it there.

Please note, errors will be shown to host users but will not be shown to non-host users as that could lead to information leakage - also, all unexpected exceptions will be logged and their full stack trace can be viewed by going to admin->event viewer.


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
6/4/2012 3:33 AM
 
Hi,

host -> host settings -> appearance -> unchecking "use custom error messages" works.

Thank you!
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Show custom error page when an exception is thrown on server side (while handling a postback)Show custom error page when an exception is thrown on server side (while handling a postback)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out