locked
Error while using AspNet.Identity.EntityFramework (Owin/Katana): The ObjectContext instance has been disposed and can no longer be used for operations that require a connection RRS feed

All replies

  • User1120430333 posted

    Maybe, you'll post to the below forum.

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetentityframework

    Friday, July 21, 2017 3:41 PM
  • User1168443798 posted

    Hi bharatmishra,

    Could you share us detail steps to reproduce your issue with auth-identity project? I have downloaded it, and then run it, there is no any error.

    How did you make ApplicationDbContext to run Seed method. I tried below code to fore Seed data, and there is still no exception.

            private void ConfigureAuth(IAppBuilder app)
            {
                // Create per OWIN Context:
                app.CreatePerOwinContext<ApplicationDbContext>(ApplicationDbContext.Create);
                var context = ApplicationDbContext.Create();
                context.Database.Initialize(true);
                app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
    

    Best Regards,

    Edward

    Monday, July 24, 2017 6:41 AM