![](/img/trans.png)
[英]How to provide database configuration settings in code-first Entity Framework?
[英]my sql provide 6.4.3.0 support for code first entity framework
我在服務器上使用sql 6.4.3.0,它返回錯誤:
'The provider did not return a ProviderManifestToken string.'
但是在我的本地環境中,我的sql v-6.4.4.0創建數據庫的很好,但是在我的服務器中卻沒有創建數據庫。 我的sql provider是否支持沒有數據庫的核心第一個實體框架?
堆棧跟蹤
[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
在閱讀了幾篇文章后,您的問題很可能是您的我的sql 6.4.3.0版本的版本。我相信您應該將版本sql v-6.4.4.0更新為您使用的版本或下載最新版本,並保留一個好主意。本地和發展盡可能相似。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.