Background / Goal
I have an asp.net 4.5 web forms project that's now under the asp.net one architecture (so we're integrating MVC in a few parts).
I am attempting to add Elmah to this setup. My goals are:
- to log 50 errors in memory, with local access only,
- to log all errors to a SQL database (which we've set up with the Elmah scripts).
- To capture both WebForms and MVC error output into Elmah.
Problem
However, when I add the Elmah package via nuget, it does not appear to make any modifications to web.config. So, when I browse to /elmah.axd, I see:
Path '/elmah.axd' was not found. System.Web.HttpException (0x80004005): Path '/elmah.axd' was not found. at System.Web.HttpNotFoundHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
This makes sense, because web.config hasn't been modified to add the handlers.
However, adding elmah.axd does give us an MVC route. However, my instincts and some rudimentary tests tell me that these only cover errors within the purview of MVC.
Question(s)
- How can I properly configure elmah in this instance so that elmah and elmah.mvc packages both worth as desiged?
Install-Package Elmahand eventually I didInstall-Package Elmah.MVC, but that was after already configuring the XML. - SeanKilleen