How to catch Runtime errors and Log them on a ASP.NET project?
-
Hi, We have developed website using ASP.NET,C#. But they are runtime errors and we got yellow pages. So How do we catch Runtime errors and Log them? please advice.
-
Hi, We have developed website using ASP.NET,C#. But they are runtime errors and we got yellow pages. So How do we catch Runtime errors and Log them? please advice.
-
Hi, We have developed website using ASP.NET,C#. But they are runtime errors and we got yellow pages. So How do we catch Runtime errors and Log them? please advice.
First you need to find which types of runtime error your website is getting if those are catchable put that code in try and catch block and Where do you want to logg that error ? are you guys are creating text files for logging
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
First you need to find which types of runtime error your website is getting if those are catchable put that code in try and catch block and Where do you want to logg that error ? are you guys are creating text files for logging
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
web.config files SHOULD help... Hide's those nasty error pages, makes it so you can't add .cs onto files (Admin.aspx.cs ftl...), and ALOT more :) http://www.google.co.za/search?q=web.config
-
web.config files SHOULD help... Hide's those nasty error pages, makes it so you can't add .cs onto files (Admin.aspx.cs ftl...), and ALOT more :) http://www.google.co.za/search?q=web.config
Might be replied to wrong person :)
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Might be replied to wrong person :)
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi, We have developed website using ASP.NET,C#. But they are runtime errors and we got yellow pages. So How do we catch Runtime errors and Log them? please advice.
pubududilena wrote:
So How do we catch Runtime errors and Log them?
When any uncaught exception occurs, ASP.NET fires Application_Error event. Global.asax is having the event handler defined, you can use that. Or write a custom HTTP module and hook application error event. For logging, I have used log4net[^] - it's a great product. Alternatively you can use web.config's custom error section. When any error occurs, it will be redirected to the specified page. But if the application is running in heavy traffic, this won't be a good approach.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions