Elmah.MVC vs. Elmah.contrib.Mvc
asp.net-mvc, elmah
Solution
ELMAH - This is the default ELMAH package with no mvc specific code in it, if you dont do what is described here I don't believe ELMAH will log any errors that occur in you're controllers, and you may not be able to access the ELMAH log page
Elmah.Contrib.Mvc - This is an enhancement on ELMAH specifically for MVC based upon one of the creators of ELMAHS answer to a stack overflow question.
Elmah.MVC - This is simliar to the above package however I believe it provides much better support for mvc features like routes etc, It is also quite easy to install and configure, it removes a lot of the messing around you would have to do with ELMAH to take out various parts that arent required when running in a mvc project
You can read the authors posts to get a better idea of how it works:
- Integrating ELMAH to ASP.NET MVC in right way
- ELMAH MVC controller released on NuGet
- ELMAH.MVC v.2.0.0 - Release Candidate
Personally I believe the last package would be the best one ot use, it seems to be the more up to date and maintained of the two mvc ones.
Problem
I'm new to ASP.NET MVC and I'm looking for the least painful way to get global error handling, logging, and reporting (via email) set up. FYI, my ASP.NET MVC app is being hosted as a web role in Azure, but I'm trying to avoid using any Azure-specific hooks. It looks like getting ELMAH installed and configured is a good first step. When I look in NuGet, I see: - ELMAH ("ELMAH with initial configuration for getting started quickly...") - Elmah.Contrib.Mvc ("...designed to add ease-of-use inside MVC projects...") - Elmah.MVC ("...painless integration into MVC...") Which of these packages do I want to install? EDIT: After some experimentation, I'm more confused. I compared the project files after installing each of the three options on top of a default MVC 4 app. It appears that neither Elmah.Contrib.Mvc nor Elmah.MVC add the elmah.1.2.2 package (which I get when I install basic ELMAH). Also, neither package adds the `<elmah>` section to Web.config. So... do I need to install ELMAH first, and then install one of the "...MVC" packages to get whatever nifty improvements they presumably get me?