Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Glimpse EF6: ProviderIncompatibleException #1006

Open
chernihiv opened this issue Nov 14, 2017 · 7 comments
Open

Glimpse EF6: ProviderIncompatibleException #1006

chernihiv opened this issue Nov 14, 2017 · 7 comments

Comments

@chernihiv
Copy link

chernihiv commented Nov 14, 2017

Having installed extension (Glimpse EF6), I started receive the following exception (in case code is trying to access data from database via EF context).

ProviderIncompatibleException: A null was returned after calling the 'get_ProviderFactory' method on a store provider instance of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection'.  The store provider might not be functioning correctly.


[ProviderIncompatibleException: A null was returned after calling the 'get_ProviderFactory' method on a store provider instance of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection'. The store provider might not be functioning correctly.]
   System.Data.Entity.Core.Common.DbProviderServices.GetProviderFactory(DbConnection connection) +122
   System.Data.Entity.Migrations.DbMigrator.CreateConnection() +22
   System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) +91
   System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) +78
   System.Data.Entity.MigrateDatabaseToLatestVersion`2.InitializeDatabase(TContext context) +108
   System.Data.Entity.Internal.<>c__DisplayClassf`1.<CreateInitializationAction>b__e() +76
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60

[DataException: An exception occurred while initializing the database. See the InnerException for details.]
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +122
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +357
   System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +110
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +198
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
   System.Data.Entity.Internal.InternalContext.Initialize() +30
   System.Data.Entity.Database.Initialize(Boolean force) +49
   TMP.Data.DatabaseInstaller.CreateOrMigrateTMP() in C:\Work\TMP\src\Libraries\TMP.Data\DatabaseInstaller.cs:10
   TMP.Web.Mvc.MvcApplication.Application_Start() in C:\Work\TMP\src\Presentation\TMP.Web.Mvc\Global.asax.cs:92

[HttpException (0x80004005): An exception occurred while initializing the database. See the InnerException for details.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10104513
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): An exception occurred while initializing the database. See the InnerException for details.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10085804
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

I've got installed:

  <package id="Glimpse" version="1.8.6" targetFramework="net45" />
  <package id="Glimpse.Ado" version="1.7.3" targetFramework="net452" />
  <package id="Glimpse.AspNet" version="1.9.2" targetFramework="net45" />
  <package id="Glimpse.Autofac" version="0.2.4" targetFramework="net452" />
  <package id="Glimpse.AutoMapper" version="1.0.2" targetFramework="net452" />
  <package id="Glimpse.EF6" version="1.6.5" targetFramework="net452" />
  <package id="Glimpse.Mvc5" version="1.5.3" targetFramework="net45" />
  <package id="EntityFramework" version="6.2.0" targetFramework="net452" />

Connection string:
<add name="TMPDbContext" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=TMP;Integrated Security=True;Persist Security Info=False;MultipleActiveResultSets=True" />

@gregveres
Copy link

I just ran into this too after upgrading the Entity Framework package to 6.2.0.

@gregveres
Copy link

Yup, I backed down to EF 6.1.3 and things work again. It seems that glimpse is not compatible with EF 6.2.0.

@mehalick
Copy link

I had the same problem when upgrading Entity Framework to 6.2.0, reverting to 6.1.3 resolved the issue.

@Geassz
Copy link

Geassz commented Jan 25, 2018

I had the same problem when upgrading Entity Framework to 6.2.0,I must use this version,Please fix this problem.

@gregveres
Copy link

From what I read this is an entity framework problem that they have already fixed but they deemed it not important enough to release before 6.3. I think the people you need to appeal to are the entity framework people. I have stayed at version 6.1.x until it get fixed.

@rhousham
Copy link

rhousham commented Dec 4, 2018

I didn't think there would be an entity framework 6.3 since they have the new entity framework core and all efforts seem to be pushing that way.

@jakoss
Copy link

jakoss commented Dec 4, 2018

There is gonna be ef version supporting netstandard (. Net core 3), so I think it's premature to tell 6.3 won't be released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants