how we handle exceptions in asp.net application

Posted by Jameschowdare under Regular Expressions on 2/8/2010 | Views : 1435 | Status : [Member] | Replies : 3
dont tel use try catch...

i want to know instead of each page using above

is there the centralization procedure there,

and where these store all the logged information
and explain us more on this if i missed about anything abt exception handling


Thanks
JamesOnly




Responses

Posted by: Raja on: 2/8/2010 [Member] Starter

Up
0
Down
This can be done using Application_Error event in the Global.aspx file, so if any error will occur this method will fire and you can log that error wherever required.

Also go through this link, it might help http://www.15seconds.com/issue/030102.htm

Regards

Regards,
Raja, USA

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishithraj on: 2/11/2010 [Member] Bronze

Up
0
Down
Even you can capture the error events in global.asax
void Application_Error(object sender, EventArgs e) 

{
// Code that runs when an unhandled error occurs

}


for more about the try catches disadvantages refer

http://forums.asp.net/p/1344201/2728069.aspx

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 3/26/2010 [Member] Bronze

Up
0
Down
Hi friend

check following Article

http://www.dotnetjohn.com/articles.aspx?articleid=42 



Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response