How to use EntityFramework connection string for Elmah?
Posted
by Andrii Kovalchuk
on Stack Overflow
See other posts from Stack Overflow
or by Andrii Kovalchuk
Published on 2009-07-05T06:21:04Z
Indexed on
2010/05/09
2:48 UTC
Read the original article
Hit count: 370
In ELMAH for logging errors to the database you can write:
<errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="EducoparkEntities"/>
However, if I use EntityFramework, this doesn't work because the connection string for EF contains metadata as well:
<add name="EducoparkEntities" connectionString="metadata=res://*/EducoparkData.csdl|res://*/EducoparkData.ssdl|res://*/EducoparkData.msl;provider=System.Data.SqlClient;provider connection string="Data Source=(Local);Initial Catalog=...;User Id=...;Password=...;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient"/>
So, how can I use the EntityFramework connection string in Elmah?
© Stack Overflow or respective owner