【问题标题】:my sql provide 6.4.3.0 support for code first entity framework我的 sql 为代码优先实体框架提供 6.4.3.0 支持
【发布时间】:2012-12-06 05:37:43
【问题描述】:

我在服务器中使用我的 sql 6.4.3.0,它返回错误:

 'The provider did not return a ProviderManifestToken string.'

但是在我的本地,我的 sql v-6.4.4.0 可以很好地创建数据库,但是在我的服务器中没有创建数据库。我的 sql 提供程序是否支持没有数据库的核心第一实体框架?

堆栈跟踪

[MySqlException (0x80004005): Unknown database 'globaldb']
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +196
   MySql.Data.MySqlClient.NativeDriver.AuthenticateSSPI() +22
   MySql.Data.MySqlClient.NativeDriver.AuthenticateNew(Boolean reset) +354
   MySql.Data.MySqlClient.NativeDriver.Authenticate(Boolean reset) +113
   MySql.Data.MySqlClient.NativeDriver.Open() +1034
   MySql.Data.MySqlClient.Driver.Open() +22
   MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +218
   MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +286
   MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +93
   MySql.Data.MySqlClient.MySqlPool.GetConnection() +65
   MySql.Data.MySqlClient.MySqlConnection.Open() +332
   MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection connection) +36
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +26

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +170
   System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +40
   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +154
   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +39
   System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +123
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +414
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +17
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +58
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +37
   System.Linq.Queryable.Select(IQueryable`1 source, Expression`1 selector) +66
   MyBusinessApp.MvcApplication.InitializeDatabase() in C:\APPS\TestShell\mybusinessapp2\Global.asax.cs:59
   MyBusinessApp.MvcApplication.Application_Start() in C:\APPS\TestShell\mybusinessapp2\Global.asax.cs:53

[HttpException (0x80004005): The provider did not return a ProviderManifestToken string.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859725
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): The provider did not return a ProviderManifestToken string.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

【问题讨论】:

    标签: c# asp.net mysql ef-code-first


    【解决方案1】:

    在阅读了几篇帖子后,您的问题很可能出在您的 my sql 6.4.3.0 版本中保持本地和开发尽可能相似。

    【讨论】:

    • 好的,但那是在服务器中,那么有没有其他解决方案可以在不升级版本的情况下使用相同的解决方案?
    • 在你的本地降级到 sql 6.4.3.0,看看它是否编译,这是我唯一能建议的
    • 在将本地连接器更改为 6.4.3.0 后出现错误:在 MySql.Data.MySqlClient.MySqlClientFactory.System.IServiceProvider.GetService(Type serviceType) 处的 MySql.Data.MySqlClient.MySqlClientFactory.get_MySqlDbProviderServicesInstance()在 System.Data.Common.DbProviderServices.GetProviderServices(DbProviderFactory factory) 在 System.Data.Common.DbProviderServices.GetProviderServices(DbConnection 连接) 在 System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection 连接,DbProviderManifest& providerManifest)
    • 你之前遇到的同样的错误,这意味着本地到 6.4.3.0 的连接器与你正在做的事情无法比较。
    • @COLO TOLD 是同样的错误。但是我们可以在不安装 6.4.4.0 的情况下实现这一点,但是这个链接:stackoverflow.com/questions/6395795/…。但我升级到最新版本。
    猜你喜欢
    • 2011-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-01
    • 2014-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多