Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elmah vs Elmah.MVC Nuget Package - Which to use & why?

I have Code First MVC 4 application.

I tried installing the NuGet package for logging Elmah - and everything seemed to work fine - Errors were reported fine at http://myapp/elmah.axd

I then noticed there was an Elmah.MVC package - so i removed the original one, and installed that. It no longer worked here: http://myapp/elmah.axd

I have read in a few places that for MVC apps, you should use the 'Elmah.MVC' package - rather than the 'Elmah' package - but why is this? What would the practical difference be? Is this still the case with MVC 4 sites?

It is strange the original package works out of the box and the MVC one doesn't.

Which should I use and why?

like image 889
niico Avatar asked May 23 '13 17:05

niico


1 Answers

According to the Nuget website, you can access Elmah using the url /elmah.

https://www.nuget.org/packages/Elmah.MVC

Painless integration of ELMAH functionality into ASP.NET MVC Application. Just drop the package inside you ASP.NET MVC application and access /elmah URL. It will also install global HandleError filter, that guarantees all unhandled errors is logged (even if customerError turned "On").

like image 62
Rhapsody Avatar answered Sep 19 '22 22:09

Rhapsody