473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Trap all errors

Is it possible to trap all errors within a web app and do the following

Send the user to another page "Error.aspx"
Send an email to myself with the filename and as much information about the
error as possible.

I take it this would be done in the Global.asax file but not too sure where
to start.

Any ideas greatly appreciated!
Nov 16 '05 #1
3 1443
http://www.codeproject.com/dotnet/un...exceptions.asp will give you a
start, the email part is left up to you :)

"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:HS*********************@news-text.cableinet.net...
Is it possible to trap all errors within a web app and do the following

Send the user to another page "Error.aspx"
Send an email to myself with the filename and as much information about the error as possible.

I take it this would be done in the Global.asax file but not too sure where to start.

Any ideas greatly appreciated!

Nov 16 '05 #2
Cheers Jim.

Email's not a problem!
"Jim Hughes" <NO*********@Hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP11.phx.gbl...
http://www.codeproject.com/dotnet/un...exceptions.asp will give you a
start, the email part is left up to you :)

"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:HS*********************@news-text.cableinet.net...
Is it possible to trap all errors within a web app and do the following

Send the user to another page "Error.aspx"
Send an email to myself with the filename and as much information about

the
error as possible.

I take it this would be done in the Global.asax file but not too sure

where
to start.

Any ideas greatly appreciated!


Nov 16 '05 #3
You could also use the Exception Management Application Block, catch
unhandled exceptions, and publish them using a custom publisher. This would
have the advantage of giving you the ability to publish to the application
log simultaneously, while your custom publisher might screen exceptions and
only email certain ones (or just send an alert so the administrator could go
back and check the log).

"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:Ln*********************@news-text.cableinet.net...
Cheers Jim.

Email's not a problem!
"Jim Hughes" <NO*********@Hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP11.phx.gbl...
http://www.codeproject.com/dotnet/un...exceptions.asp will give you a start, the email part is left up to you :)

"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:HS*********************@news-text.cableinet.net...
Is it possible to trap all errors within a web app and do the following
Send the user to another page "Error.aspx"
Send an email to myself with the filename and as much information
about the
error as possible.

I take it this would be done in the Global.asax file but not too sure

where
to start.

Any ideas greatly appreciated!



Nov 16 '05 #4

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

Similar topics

10
by: Mike D | last post by:
I have a table in SQL 2000 with a composite Primary Key on coulumns Instrument_ID (int) and WeekOf (smalldatetime.) I am running asp on win 2003. I insert values using a stored procedure from...
3
by: Eitan | last post by:
Hello, I want to emphasize a point for my prior posts : How can I trap a message in ASP (not dotnet), to a specific label. (I know : on error goto my_label ... but this does not work in ASP...
0
by: doli | last post by:
Hi, I have the following piece of code which iterates through the potential errors: i =0 For Each error_item in myConn.Errors DTSPackageLog.WriteStringToLog myConn.Errors(i).Description...
3
by: Detlev Ahlgrimm | last post by:
Hi! I have to use MS-Access2000 as a frontend for an oracle database. And I dont want to see these ORA-xxxx Popups if an error occures. So I use something like the following in access (it should...
2
by: ramu | last post by:
Hi, I read the phrase " trap representation" in the topic "Union arrangement" in this group. Can you please tell me what do you mean by it? regards
10
by: pemo | last post by:
As far as I understand it, a trap representation means something like - an uninitialised automatic variable might /implicitly/ hold a bit-pattern that, if read, *might* cause a 'trap' (I'm not...
5
by: rod.weir | last post by:
Hello, I have the following code to iterate through each view in a SQL Server and call the "sp_refreshview" command against it. It works great until it finds a view that is damaged, or otherwise...
1
by: Massimiliano Campagnoli | last post by:
Hi All, I know that db2 V7.2 is no more supported and nor OS/2 is supported anymore but I wonder if someone here can give me some help on this. Platform: DB2 V7.2 FixPak 14 OS: OS/2 (actually...
2
by: JP SIngh | last post by:
We are using an ASP page to allow our users to update this Active Directory Information. Our testing show that for 90% of the users this works fine but for a small number of users it gives an...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
I have to read data from an Excel Sheet. Using Microsoft Office Interop and Automation I create an Excel object Dim xl As New Excel.Application, wkbk As Excel.Workbook, rng as Excel.Range I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.