Products

Solutions

Resources

Partners

Community

About

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 ...Custom Exception Module and Compression problemsCustom Exception Module and Compression problems
Previous
 
Next
New Post
7/7/2008 12:01 PM
 

Hello everybody,

we have a dotnetnuke site where we set up a custom ExceptionHandler module. What the module does is redirect the user to a specific CustomError.aspx page where, depending on the value of the debug parameter in web.config, we either display the source of the error (complete with filename and line number, and as much info as possible/reasonable) or a generic message telling the user that we're aware of the problem and that we've logged it. We do log it, through internal mailing and bugtracking system...

Everything went fine until recently. We decided to upgrade from DNN 4.3 to DNN 4.8. In the process, i discovered some new options i was interested in, such as the Compression Module. However, when we activate the compression module, redirecting to the CustomError.aspx doesn't work anymore and we get the standard yellow asp.net error page saying that custom errors aren't set up.

There is also an exception coming from the compression module saying that it cannot append headers to the message: apparently this happens when the compression module tries to add the compression header to the Response object.

So basically, here is a step-by-step of what happens (you can also look there to have an idea of the rough working of the handler: http://www.dotnetjohn.com/articles.aspx?articleid=42 or http://www.codeproject.com/KB/aspnet/ASPNETExceptionHandling.aspx):

- unhandled exception fires up

- Custom Exception Module catches it -> Server.Transfer("CustomError.aspx")

- CustomError page gets latest error, pretties it up and either shows the debugging data or logs it and redirects the user to another page where we tell him we're on the case.

I tried to bypass the problem in a lot of ways, but i'm at my wits' end, especially regarding my unsifficient knowledge of DNN. So, am i doing something very wrong here and should i change our custom error handler to benefit more from DNN's architecture, or is there a configuration thingie that i've overlooked?

Thank you for reading and for any input!

samy

 
New Post
7/9/2008 3:53 AM
 

Regarding this problem,

here are some avenues i have tried.

Changing the Server.Transfer call to Response.Redirect doesn't seem to work (i have the same exception popping, but the behavior is a bit different). I would have thought that since the exact exception is "Server cannot append header after HTTP headers have been sent."

The full StackTrace for the error is:

"   at System.Web.HttpResponse.AppendHeader(String name, String value)
   at DotNetNuke.HttpModules.Compression.CompressingFilter.WriteHeaders()
   at DotNetNuke.HttpModules.Compression.GZipFilter.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.Web.HttpWriter.Filter(Boolean finalFiltering)
   at System.Web.HttpResponse.Flush(Boolean finalFlush)
   at System.Web.HttpResponse.Flush()
   at System.Web.HttpResponse.End()
   at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveform)
   at System.Web.HttpServerUtility.Transfer(String path)
   at ImportLibraryWebsite.SCPPExceptionModule.app_Error(Object sender, EventArgs e) in C:\DevPath\CustomExceptionModule.vb:line 29"

I also tried to have the CustomExceptionModule write directly the desired output without going to a different page, but even then i seem to hit the same problem.

My explorations lead me to believe that somewhere along the path the Response.End is called (or Response.Flush) and as a result the Compression filter cannot work its magic. However i would really like it if somebody who either created its own ExceptionModule or encountered the same problem, or simply set up this kind of system could share insight on the problem...

On a final note, i found out that the compression module shouldn't try to compress files other than Default.aspx... am I missing something here? Shouldn't the CustomError.aspx be completely excluded from compression?

Thank you very much!

samy

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Custom Exception Module and Compression problemsCustom Exception Module and Compression problems


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