EFPower tool 使用时发生的异常
来源:互联网 发布:gxh-305分析仪的数据 编辑:程序博客网 时间:2024/05/18 00:43
EF Power Tool 可以从数据库反向出Model,可是在使用的过程中出现了一个奇怪的问题,第一次是正常的,后来不知什么原因,总是提示异常。异常信息如下:
System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> System.InvalidOperationException: This operation requires a connection to the 'master' database. Unable to create a connection to the 'master' database because the original database connection has been opened and credentials have been removed from the connection string. Supply an unopened connection. ---> System.Data.SqlClient.SqlException: 用户 'sa' 登录失败。
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.SqlClient.SqlProviderServices.UsingConnection(SqlConnection sqlConnection, Action`1 act)
at System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act)
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act)
at System.Data.SqlClient.SqlProviderServices.GetDbProviderManifestToken(DbConnection connection)
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
--- End of inner exception stack trace ---
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
at System.Data.Entity.Design.EntityStoreSchemaGenerator.GetProviderSchemaMetadataWorkspace(DbProviderServices providerServices, DbConnection providerConnection)
at System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateStoreSchemaConnection(String providerInvariantName, String connectionString)
at System.Data.Entity.Design.EntityStoreSchemaGenerator..ctor(String providerInvariantName, String connectionString, String namespaceName)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)
后来发现,在连接数据库时,连接字符串中,要确保Persist Security Info=True;
因为成功那次,我选择了保存密码,这样就把Persist Security Info的值设置为True了。如果这个值为false,就是不保存密码,EF power tool 就没有办法连接数据库。
- EFPower tool 使用时发生的异常
- 使用junitreport生成报告时,发生异常的情况
- 3.hibernate使用注解时发生的异常
- 使用DBCP时发生AbstractMethodError异常
- 避免异常发生时的资源泄漏
- 使用POI3.5时,为能兼容Excel2007而发生的异常
- VC操作Excel,使用Worksheet的get_Range发生异常
- 使用set时发生Java ConcurrentModificationException异常原因和解决方法
- 使用AlertDialog时发生了空指针异常
- 使用@ControllerAdvice实现发生异常时返回json错误信息
- SP Flash Tool使用异常集锦
- i2c tool 的使用
- inotify-tool的使用
- i2c tool 的使用
- 【tool】logminer的使用
- 异常的发生,捕获,处理
- AIDL 发生异常的原因
- AIDL 发生异常的原因
- SamsungS3C2440平台上的VxworksBSP移植
- sched_setscheduler用法
- 一个域(协议+域名+端口)的资源:页面+页面标签加载的资源
- linux 动态库
- 地址翻译概述
- EFPower tool 使用时发生的异常
- 检测80端口是否启用
- VBA Excel 2007 画饼图
- C#反转字符串
- python中线程的使用
- 谈谈proxy的安全问题
- C程序设计课程 第十三堂课后作业
- 在 VC6 中使用 GdiPlus-使用
- python实现网络爬虫