Skip to content

MP.EF6 + ASP.NET identity + Owin #98

@Elvinra

Description

@Elvinra

When i tryed to init MP.EF6 in my Startup class, i have an exception 👍

Message : 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 http://go.microsoft.com/fwlink/?LinkId=260883 for more information.

StackTrace :
  at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.AddLoadedHandler(EventHandler`1 handler)
  at System.Data.Entity.DbConfiguration.add_Loaded(EventHandler`1 value)
  at StackExchange.Profiling.EntityFramework6.MiniProfilerEF6.Initialize() dans d:\Files\GitHub\miniprofiler\dotnet\StackExchange.Profiling.EntityFramework6\MiniProfilerEF6.cs:ligne 30
  at ManahostManager.App_Start.WebApiApplication.Configuration(IAppBuilder app) dans c:\Users\Fabrice\Source\Repos\manahostmanager\ManahostManager\App_Start\WebApiApplication.cs:ligne 86

That exception was only occured when i migrate to ASP.NET Identity after that he is working fine

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions