For painless integration of ELMAH into ASP.NET MVC application. For detailed instructions, please check link below.
See, http://www.beletsky.net/2011/03/integrating-elmah-to-aspnet-mvc-in.html
- In VS2010 New -> Project -> ASP.NET MVC3 Application
- Install ELMAH by NuGet, in package console - Install-Package elmah
- Add Admin area for application
- Add ELMAHController.cs to Areas/Admin/Controllers folder.
- Create new route to ELMAH (see Areas/Admin/AdminAreaRegistration.cs)
- Run application and go to /admin/elmah
Easy. Install ELMAH by NuGet, in package console
Install-Package Elmah.MVC
You are very welcome to change and improve the code. Please note that once src/Areas/Admin/Controllers/ElmahController.cs is changed, corresponding nuget/content/Areas/Admin/Controllers/ElmahController.cs.pp have to be changed as well.
- 29-Aug-2011 - nuget package created
- 29-Aug-2011 - reimplemented controller to avoid usage of additional routing instructions