2
Answers

Save Elmah Logs To My Own Database Table

Nabil Nawaz

Nabil Nawaz

8y
354
1
hello guys.
hope you all are good.
 
i'v created a project in asp.net MVC. i've implemented ELMAH in it. i'm using ELMAH to store generated errors to the DATABASE provided by the ELMAH on it's official website. This database has only one table named ELMAH_Error
 
The question is can I store these errors exceptions in my own project's database by creating a table  ELMAH_Error ? Instead of using Elmah's provided Database ?
 
 
Answers (2)
1
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
I suppose so. I just googled and found following:
 
<errorLog type="Elmah.SqlErrorLog, Elmah.SqlServer"
  connectionStringName="..." />
 
 
I guess all you have to do is provide an appropriate connection string pointing to your database. 
 
If possible, could please post the relevant portion of existing settings?
 
0
Nabil Nawaz

Nabil Nawaz

NA 186 3.8k 8y

I  created table and stored procedures of ELMAH database in my own database. i'm using entity framework in my project, when i pass the connection string name to ELMAH in webconfig file and run the project it gives me error about "metadata" which is in entity framework connection string.
I think ELMAH does'nt recognize metadata .how can i use ELMAH to use Entityframework connection string ? i changed my Entityframework connectionstring to ADO connectionstring then things were working correctly and error logs also saving to database. but i was not able to login and perform any database action.how can i solve this issue in ELMAH??