2

I would like to use ELMAH in ASP.NET MVC3 project. I used nuget install package and install ELMAH. It configure itself in config file, with connection string.

Question: It propose to define connection string in config file. but I can not define connection string in config file and connection string dynamicaly produce with custom connection provider factory when application start. How can I set connection string or DbConnection for ELMAH?

Thanks in advance.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Nuri YILMAZ
  • 4,291
  • 5
  • 37
  • 43

1 Answers1

1

Try How to use EntityFramework connection string for Elmah?

Essentially you need to create your own ErrorLog implementation (inherit from SqlErrorLog) and override the ConnectionString property.

Community
  • 1
  • 1
Ben Foster
  • 34,340
  • 40
  • 176
  • 285