mishrsud / mvc-mini-profiler

Automatically exported from code.google.com/p/mvc-mini-profiler
0 stars 0 forks source link

ProfiledDbConnection no longer overrides the DbProviderFactory property, causes runtime exception #101

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upgrade from version 1.7 to version 1.9.

What is the expected output? What do you see instead?

I expect to see my web application's home page. Instead, I see an error page 
with the following error message:

A null was returned after calling the 'get_ProviderFactory' method on a store 
provider instance of type 'MvcMiniProfiler.Data.ProfiledDbConnection'. The 
store provider might not be functioning correctly.

What version of the product are you using? On what operating system?

I am using version 1.9.

Please provide any additional information below.

After upgrading from version 1.7 to 1.9, I get the following runtime exception 
when trying to run the application:

A null was returned after calling the 'get_ProviderFactory' method on a store 
provider instance of type 'MvcMiniProfiler.Data.ProfiledDbConnection'. The 
store provider might not be functioning correctly.

The stack trace of this exception is the following:
[ProviderIncompatibleException: A null was returned after calling the 
'get_ProviderFactory' method on a store provider instance of type 
'MvcMiniProfiler.Data.ProfiledDbConnection'. The store provider might not be 
functioning correctly.]
   System.Data.Common.DbProviderServices.GetProviderServices(DbConnection connection) +287
   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +201
   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +61
   System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +1213914
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +492
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +25
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +89
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +21
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +44
   System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +135

I have also asked a question about this issue on StackOverflow:

http://stackoverflow.com/questions/7257271/mini-profiler-upgrade-from-1-7-to-1-9
-breaks-existing-code/7257928#7257928

Original issue reported on code.google.com by aau...@gmail.com on 31 Aug 2011 at 2:54