I am getting following error during integration of miniprofiler
The Entity Framework was already using a DbConfiguration instance before an attempt was made to add an 'Loaded' event handler. 'Loaded' event handlers can only be added as part of application start up before the Entity Framework is used. See this for more information.
Below is code of Global.asax
protected void Application_Start()
{
StackExchange.Profiling.EntityFramework6.MiniProfilerEF6.Initialize();
//MiniProfilerEF6.Initialize();
....
....
}
I am using
I am using ASP.NET MVC 4
EF 6 (Code first )
I searched this google but couldn't find any solution
Copyright Notice:Content Author:「imran」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39203102/getting-error-in-miniprofiler-in-asp-net-mvc-application