handling Unhandled exception in Custom Error Page

Posted by .Netlearner under ASP.NET on 3/25/2013 | Points: 10 | Views : 1165 | Status : [Member] | Replies : 2
Hello All,

I want to display all the unhandled exceptions that arise while execution in my custom error page. such as. sql error, coding error etc.

i tried creating session in global.asax page but error is coming. Can anyone please guide me.




Responses

Posted by: Jayakumars on: 3/25/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this code

Try

Catch ex As Exception
Err.WriteTextFile(ex.Message())
End Try

Mark as Answer if its helpful to you

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

Posted by: .Netlearner on: 3/25/2013 [Member] Starter | Points: 25

Up
0
Down
i want to display unhandled exception in my custom error page. The above code will copy the exception in text file only na?










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

Login to post response