473,774 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Catching Framework Errors

My site uses the fairly standard approach of trapping errors in the
Application_Err or 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

Nov 17 '05 #1
1 1218
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.ht m 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" <to********@blu eyonder.co.yuk> wrote in message
news:O$******** ******@tk2msftn gp13.phx.gbl...
My site uses the fairly standard approach of trapping errors in the
Application_Err or 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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2487
by: Florian Fredegar Haftmann | last post by:
Hi! I'm working on a tool which helps in testing applications with web-frontends (on Windows) On thing I would like to test ist the occurence of JavaScript errors; the idea is that the test tool does many request and actions on the Internet Explorer and collects all errors (including JavaScript errors) together into a report. I've setted up a framework for controlling an Internet Explorer instance using Python and win32com, but so far I...
8
28896
by: Steinar Bang | last post by:
Is there a way to catch HTTP 4xx and 5xx errors occuring in an IFRAME? I want to replace the blue and white tomcat error pages, with a small discrete text saying "The page currently not available". The browser in question is Mozilla 1.3.1. But it would be nice if the solution also worked in Opera 7.x, and IE 5.x and 6.x. I know that setting an onError function on the IFRAME doesn't work, both because  says that it only works for...
7
2340
by: cmay | last post by:
FxCop complains every time I catch System.Exception. I don't see the value in trying to catch every possible exception type (or even figuring out what exceptions can be caught) by a given block of code, when System.Exception seems to get the job done for me. My application is an ASP.Net intranet site. When I catch an exception, I log the stack trace and deal with it, normally by displaying an error
9
3215
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My questions are below... "David Good" wrote: > We have a network running both Win2k and Win2k3 webservers and our web sites > reside on a UNC network share that happens to be a Network Appliance NAS.
0
1073
by: R. MacDonald | last post by:
Hi, I have a VB.Net application that dynamically calls unmanaged routines in a DLL that has been created by Fortran (DVF v5). The call to the DLL routine is within a Try/Catch block, but when one of the DLL (Fortran) routines triggers a run-time error, the VB.Net application terminates rather than catching the error. Is there any way to be able to catch these Fortran run-time errors in
4
3492
by: Nindi | last post by:
Hi I have a scenario with exceptions that I cannot explain. I have an exception class 'MyException' derived from 'std::exception' There are two libraries 'plugin' and 'framework' linked together by loading at runtime. The issue is that an exception of type 'MyException' is being thrown in
4
1965
by: John Pye | last post by:
Hi all I have some C code that is giving me some 'nan' values in some calculations. The C code is wrapped using SWIG to give me a Python module that I am then exercising through a unittest suite. It seems that I should expect the C code to throw floating point exceptions (SIGFPE) and either the whole thing to abort, or for Python to catch the errors and report them. Instead I'm getting neither. I want to be able to track down the...
4
1751
by: =?Utf-8?B?SmFzb24gUmljaG1laWVy?= | last post by:
Is there a way to catch an application configuration error on startup? I have written a windows service. If there is an error in the configuration file (such as invalid xml) the exception is thrown before the OnStart method is invoked. Is there a way to catch this exception? Thank you, Jason Richmeier
3
3287
by: john | last post by:
I wrapped some fortran code using F2PY and need to be able to catch fortran runtime errors to run the following: # "grid" is a wrapped fortran module # no runtime errors incurred when run with the correct inputs for filetype #------------------------------- def readGrid( self, coord='xyz' ): mg = ( '.FALSE.', '.TRUE.' ) form = ( 'FORMATTED', 'UNFORMATTED' )
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.