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
  • 95,331
  • 80
  • 293
  • 426
Nuri YILMAZ
  • 4,213
  • 5
  • 36
  • 42

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
  • 33,525
  • 36
  • 167
  • 284