Where does ELMAH save its data?

前端 未结 2 588
暖寄归人
暖寄归人 2021-01-31 14:59

I just installed ELMAH.MVC (more info here) and was wondering where its data is saved. I read that you can choose to set up database for storage but seems that the default insta

2条回答
  •  遇见更好的自我
    2021-01-31 15:47

    Yes, by default it uses memory storage. When your application pool is restarted, you loose elmah data. If I remember well, old versions of elmah used App_Data folder for storing xml files...If you want to use database to store logs, just specify connection string in your elmah config section:

    
    ...
     
    
    ...
    
    

    You should have ElmahConnectionString in your connectionStrings section, something like this:

    
        
    ...
    
    

    Here you can find example web.config file.

提交回复
热议问题