williamsandonz
williamsandonz

Reputation: 16420

Elmah isn't saving errors

I just installed Elmah is Nuget and it shows teh errors, but when I restart my web application, it doesn't have the old one, how do I configure it to save it? I thought it would do that automatically..

Upvotes: 2

Views: 1039

Answers (1)

Dave R.
Dave R.

Reputation: 7304

If you're using the default provider, your error log won't survive application restarts because it's stored in memory. Choose a different provider instead, such as XML file or one of the database ones, such as Elmah.SqlErrorLog - you need to edit the web.config file to change this.

There's more info on the web. For example:

http://code.google.com/p/elmah/wiki/DotNetSlackersArticle#Storing_errors_in_memory

http://www.devcurry.com/2012/05/error-handling-elmah-in-aspnet-mvc.html

Upvotes: 4

Related Questions