运行报错,已经有添加
public class AppBoxContext : DbContext
{
public AppBoxContext() : base("Default")
{
}
“/”应用程序中的服务器错误。
找不到方法:“System.Data.Entity.Infrastructure.IDbExecutionStrategy System.Data.Entity.Core.Common.DbProviderServices.GetExecutionStrategy(System.Data.Common.DbConnection, System.String)”。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.MissingMethodException: 找不到方法:“System.Data.Entity.Infrastructure.IDbExecutionStrategy System.Data.Entity.Core.Common.DbProviderServices.GetExecutionStrategy(System.Data.Common.DbConnection, System.String)”。
源错误:
行 34: public static void InitConfigs()
行 35: {
行 36: _configs = PageBase.DB.Configs.ToList();
行 37: }
行 38:
源文件: d:\baiduyundownload\FineUIPro公测版\AppBoxPro_v1.1_source_all\AppBoxPro\Business\Helper\ConfigHelper.cs 行: 36
堆栈跟踪:
[MissingMethodException: 找不到方法:“System.Data.Entity.Infrastructure.IDbExecutionStrategy System.Data.Entity.Core.Common.DbProviderServices.GetExecutionStrategy(System.Data.Common.DbConnection, System.String)”。]
System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act) +0
System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act) +335
System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript) +151
System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +288
System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) +110
System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase() +234
System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection) +143
System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) +207
System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) +42
System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) +136
System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update() +33
System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext) +175
System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState) +150
System.Data.Entity.Database.Create(DatabaseExistenceState existenceState) +415
System.Data.Entity.DropCreateDatabaseAlways`1.InitializeDatabase(TContext context) +160
System.Data.Entity.Internal.<>c__DisplayClassa`1.<CreateInitializationAction>b__9() +165
System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +110
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +676
System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +31
System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +143
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +308
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +177
System.Data.Entity.Internal.InternalContext.Initialize() +42
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +39
System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +138
System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator() +38
System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() +108
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +369
System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
AppBoxPro.ConfigHelper.InitConfigs() in d:\baiduyundownload\FineUIPro公测版\AppBoxPro_v1.1_source_all\AppBoxPro\Business\Helper\ConfigHelper.cs:36
AppBoxPro.ConfigHelper.get_Configs() in d:\baiduyundownload\FineUIPro公测版\AppBoxPro_v1.1_source_all\AppBoxPro\Business\Helper\ConfigHelper.cs:23
AppBoxPro.ConfigHelper.GetValue(String key) in d:\baiduyundownload\FineUIPro公测版\AppBoxPro_v1.1_source_all\AppBoxPro\Business\Helper\ConfigHelper.cs:50
AppBoxPro.ConfigHelper.get_Theme() in d:\baiduyundownload\FineUIPro公测版\AppBoxPro_v1.1_source_all\AppBoxPro\Business\Helper\ConfigHelper.cs:160
AppBoxPro.PageBase.OnInit(EventArgs e) in d:\baiduyundownload\FineUIPro公测版\AppBoxPro_v1.1_source_all\AppBoxPro\Business\PageBase.cs:79
System.Web.UI.Control.InitRecursive(Control namingContainer) +134
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489
版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34212 |