I've installed Elmah.MVC nuget to my web application and got it up and running. I am able to see the error log when I have this xml tag <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
in my <elmah></elmah>
.
What I am trying to do is log the errors in a SQL Server database, so I added this line <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ElmahConnection" />
and removed the old one. The ElmahConnection
connection string points to an existing database in which I have successfully managed to create the table that Elmah requires and it has the stored procedures and everything. But when I try to access a non-existing page there are no logs in the table and when trying to reach /elmah.axd
I get this
Could not find stored procedure 'ELMAH_GetErrorsXml'.
I finally managed to get it working by creating a new database and executing this script to it --> script. After that I granted my user permissions over that database.