ASP.NET MVC web application exception handling

406 Views Asked by At

ASP.NET MVC web application exception handling using application blocks.

How can i configure Microsoft Application blocks for exception handling in .NET MVC2 web application logging the error to the sql database?

2

There are 2 best solutions below

0
On

You can write own Library bur this is not easy so i prefer u Use Elmah

I think elmah is good because now 588,786 is downloaded so we safely to use. You can simply install

PM> Install-Package elmah

ELMAH with initial configuration for getting started quickly. ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.

0
On

You might want to think about ELMAH. It is much lighter than Application Blocks and you can use it as a filter for handling errors.