具有不变名称'System.Data.SqlServerCe.4.0'的ADO.NET提供程序未注册

时间:2015-12-14 16:56:10

标签: entity-framework model-view-controller sql-server-ce sql-server-ce-4

我们正在尝试将MVC解决方案部署到客户,但他们在尝试登录时遇到错误。

我搜索过类似的问题,但尚未找到解决方案。

  • 它安装了SQL CE 4.0。

  • 我已经检查了app.config,但似乎没问题。它具有建议here

    的行

     

有人可以了解以下错误日志吗?

  

2015-10-05 09:59:54,259 [34]致命 - []异常被抓获   System.Data.DataException:初始化数据库时发生异常。有关详细信息,请参阅InnerException。 ---> System.Data.Entity.Core.MetadataException:指定的架构无效。错误:   (0,0):错误0175:具有不变名称“System.Data.SqlServerCe.4.0”的ADO.NET提供程序未在计算机或应用程序配置文件中注册,或者无法加载。有关详细信息,请参阅内部异常      在System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors()      at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Init(IEnumerable 1 xmlReaders, IEnumerable 1 filePaths,Boolean throwOnError,IDbDependencyResolver resolver,DbProviderManifest& providerManifest,DbProviderFactory& providerFactory,String& providerInvariantName,String& providerManifestToken,Memoizer { {1}} 1个xml阅读器)      在System.Data.Entity.Utilities.XDocumentExtensions.GetStorageMappingItemCollection(XDocument model,DbProviderInfo& providerInfo)      在System.Data.Entity.Migrations.Infrastructure.EdmModelDiffer.Diff(XDocument sourceModel,XDocument targetModel,Lazy 2& cachedCTypeFunction) at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection..ctor(IEnumerable 1 pendingMigrations,String targetMigrationId,String lastMigrationId)      在System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)      在System.Data.Entity.MigrateDatabaseToLatestVersion 1 modificationCommandTreeGenerator, MigrationSqlGenerator migrationSqlGenerator, String sourceModelVersion, String targetModelVersion) at System.Data.Entity.Migrations.DbMigrator.IsModelOutOfDate(XDocument model, DbMigration lastMigration) at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable 1.PerformAction(TInput输入)      在System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action 2.InitializeDatabase(TContext context) at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) --- End of inner exception stack trace --- at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() at System.Data.Entity.Internal.RetryAction 1.Initialize()      在System.Data.Entity.Internal.Linq.InternalSet 1 action) at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet 1.System.Linq.IQueryable.get_Provider()      在System.Linq.Queryable.FirstOrDefault [TSource](IQueryable 1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery 1谓词)      在TWP.Areas.Core.Models.Authorization.DatabaseMembershipProvider.ValidateUser(String userName,String password)      在TWP.Areas.Core.Models.Account.AccountProvider.Logon(TwpMembershipProvider成员资格,LogOnViewModel模型)      在TWP.Areas.Core.Controllers.AccountController.LogOn(LogOnViewModel model,String returnUrl)      在lambda_method(Closure,ControllerBase,Object [])      在System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary 1 source, Expression 2个参数)      在System.Web.Mvc.ControllerActionInvoker。<> c__DisplayClass15.b__12()      在System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter过滤器,ActionExecutingContext preContext,Func 2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary 1续)      在System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter过滤器,ActionExecutingContext preContext,Func 1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func 1续)      在System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext,IList 1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func 2个参数)      在System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext,String actionName)

的Web.config:

1 filters, ActionDescriptor actionDescriptor, IDictionary

1 个答案:

答案 0 :(得分:0)

我不确定SQL CE 4.0有什么问题,但重新安装它修复了这个问题。

相关问题