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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Exception Module and Compression problems Custom Exception Module and Compression problems
Previous
 
Next
New Post
7/17/2008 4:52 AM
 

Hello everybody,

first thing, this is a crossposting from the following thread: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/threadid/240373/scope/posts/Default.aspx

I posted it in the "Configure It" forum, but seeing the lack of answers, i realized i had made a mistake. So here it is

---

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

---

ps: i bumped up the original thread with more informations and things i had tried, hoping to ignite the discussion. If you're wondering about it, don't hesitate to go and see the original post :)

 
New Post
7/18/2008 3:15 AM
 

hello everybody

once u publiched dnn you will get a error like custom error mode so it will not move forwards ....like

<customErrors mode="Off" />  ..plaease make it off.....in web.config file

Do this thing first and now check for other errors if not then . make change in web.config file like

<customErrors mode="RemoteOnly" /> because your site handle by database Dotnetnuke is work mostly on database (This is n-tier architecture ) ...so it has to be handled by remotely ...

be in touch ...

 


By Nitinkumar kakulde (Pune, India) Company: Inguinity Software Pvt. Lmt. Mobile No. +919890336633
 
New Post
7/21/2008 4:01 AM
Accepted Answer 

Hello nitin, and thank you for your reply.

However, i don't see how it relates to the problem; the custom error page is displaying all right, it's just that the Server.Transfer command in the custom error module fails when the compression module tries to do its work.

However, for anyone interested, i corrected the problem by taking the source code for the compression module and modding it so that it would skip compressing in certain cases, cases which i manually set in the custom error page.

The problem of this custom page comes from the fact that the application.Request.Url.LocalPath property is not changed when i do a Server.Transfer and that the compression module still sees the page as default.aspx

It's not a beautiful hack, i would rather have preferred something a bit cleaner, but is does the job :)

samy

 
New Post
7/21/2008 5:30 AM
 

hello samy ..

i read ur reply ...

   in my last forum . i wrote like ..we should make off to custom error ...but it should not for forever ......it just for make running our application

then u can find out next comming error .while uploading application over the net ..it is easy in local pc ...but some how bit in server side ...once u finished for error ... ur application  will get running and then u can make customError  OFF  for security perpose once it get running ..

by nitin


By Nitinkumar kakulde (Pune, India) Company: Inguinity Software Pvt. Lmt. Mobile No. +919890336633
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Exception Module and Compression problems Custom 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