PC Review


Reply
Thread Tools Rate Thread

Catching Framework Errors

 
 
TonyG
Guest
Posts: n/a
 
      23rd Aug 2003
My site uses the fairly standard approach of trapping errors in the
Application_Error event and dealing with them there.

However, we occasionally get errors that are generated by the Framework
itself and are this not trappeable by our ASP.Net code.

A good example is if someone requests a page just as the site DLL is
being uploaded, an error such as "Cannot access file XXXXXX as it is
being used by another process" is generated.

These errors are dreadful for a number of reasons.

1). They are butt ugly
2). They contain a plethora of sensitive information including
details like dll name, appBase, drive paths etc etc.
3). They do not appear to be trappeable

MY question is this. How can I catch these pages and deal with them in a
more graceful manner?

I NEED to be able to serve a custom page to my users as this page is a
horror.

Any help would be very gratefully received.

--
Tony G

 
Reply With Quote
 
 
 
 
MS News \(MS ILM\)
Guest
Posts: n/a
 
      26th Aug 2003
It works, I was able to get to the custom error page when the .dll is
missing
Here is what you have to do

1- in web.confg add the following line, save the file
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>

2- create the mycustompage.htm and place your custom error in there, save
the file

3- remove the .dll of your project from the bin directory

4- Open IE and try to open your project

5- You will get your Custom Error

6- Return the .dll back to the bin Directory of your project

7- Refresh the browser and you still see the custom error

8- Close I.E.

9- Reopen IE and open your Project

10- Back to normal

That's it, you are done

conclusion: ASP.NET looks into your web.config first which is good even if
you have no .dll in your bin directory

any other comments are welcome.

"TonyG" <(E-Mail Removed)> wrote in message
news:O$(E-Mail Removed)...
> My site uses the fairly standard approach of trapping errors in the
> Application_Error event and dealing with them there.
>
> However, we occasionally get errors that are generated by the Framework
> itself and are this not trappeable by our ASP.Net code.
>
> A good example is if someone requests a page just as the site DLL is
> being uploaded, an error such as "Cannot access file XXXXXX as it is
> being used by another process" is generated.
>
> These errors are dreadful for a number of reasons.
>
> 1). They are butt ugly
> 2). They contain a plethora of sensitive information including
> details like dll name, appBase, drive paths etc etc.
> 3). They do not appear to be trappeable
>
> MY question is this. How can I catch these pages and deal with them in a
> more graceful manner?
>
> I NEED to be able to serve a custom page to my users as this page is a
> horror.
>
> Any help would be very gratefully received.
>
> --
> Tony G
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
catching all errors =?Utf-8?B?cm9kY2hhcg==?= Microsoft ASP .NET 6 20th Nov 2006 01:19 PM
Catching errors cbh35711 Microsoft Excel Programming 0 3rd Apr 2006 09:52 PM
Catching run time errors Manish Soni Microsoft C# .NET 3 31st May 2005 05:36 PM
Catching network errors Sam Evans Microsoft C# .NET 0 20th Jan 2005 05:24 PM
Catching ASP.NET errors Mikael Engdahl Microsoft ASP .NET 3 15th Aug 2003 07:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:04 PM.