EFPower tool 使用时发生的异常
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 使用时发生的异常相关推荐
- ViewPager和SwipeRefreshLayout之间嵌套使用时发生事件冲突
有时候我们会有一种需求,一个ViewPager有n个页面,每个页面是一个Fragment,在Fragment中使用了具有垂直滑动属性的控件,比如SwipeRefreshLayout!!! 这时二者之间 ...
- C3p0使用时出现的异常及解决方案
当并发量大的时候,C3P0连接池会出现如下异常信息: Caused by: java.sql.SQLException: An attempt by a client to checkout a Co ...
- Mybatis使用时因jdbcType类型大小写书写不规范导致的异常
Mybatis使用时因jdbcType类型大小写书写不规范导致的异常 参考文章: (1)Mybatis使用时因jdbcType类型大小写书写不规范导致的异常 (2)https://www.cnblog ...
- easyexcel使用问题:使用时导出的excel文件损坏,打开不了,后台没异常错误
错误问题:使用时导出的excel文件损坏,打开不了,后台没异常错误 解决方式:因为前端使用的是blob,最后定位错误在前端发送请求时漏了一个参数, responseType: 'blob' expor ...
- [VisionPro与C#]联合编程时,遇到的异常及处理(调用目标发生了异常,对象的当前状态使该操作无效)
在进行visionPro与C#联合编程时,发生未经处理的异常,"调用目标发生了异常""对象的当前状态使该操作无效",但程序经过反复检查,逻辑上并没有错误. 后来 ...
- execjs使用时异常
execjs使用时异常 参考文章: (1)execjs使用时异常 (2)https://www.cnblogs.com/pythonywy/p/11716296.html 备忘一下.
- stm32f103c8t6使用PB3和PB4做普通GPIO使用时发现异常
在使用PB3和PB4做普通GPIO使用时,发现普通的GPIO初始化程序无法正常使用PB3和PB4,后经查阅资料,发现是因为PB3和PB4在默认情况下是做JTAG调试用的.如果需要将其当普通GPIO使用 ...
- window服务启动异常问题检查(本地计算机上的XXX服务启动后停止。某些服务在未由其它服务或程序使用时将自动停止)
完全复制过来的博客:用C#写个windows服务,安装部署后去启动时,提示说"本地计算机上的XXX服务启动后停止.某些服务在未由其它服务或程序使用时将自动停止".咋整?: 度娘说不 ...
- PowerDesigner15使用时的十五个问题
2019独角兽企业重金招聘Python工程师标准>>> 转载:http://www.cnblogs.com/netsql/archive/2010/05/28/1746586.htm ...
最新文章
- VS2010 自定义用户控件未出现在工具箱的解决方案
- 设置c#windows服务描述及允许服务与桌面交互的几种方法
- 华为成为全球领先的移动设备供应商
- [云炬创业基础笔记]第七张创业团队测试8
- dede:arclist 不能调用文章的副栏目或多个副栏目的解决方法
- QEMU 1.3 发布,模拟处理器
- memcached 相关
- 美将遣返庇护申请者至墨西哥 弱势人士有望豁免
- Delphi应用程序的调试(三)监视变量
- adaboost java_Adaboost的java实现 | 学步园
- python库--pandas--Series
- spss 通径分析_【使用SPSS线性回归实现通径分析的方法】【原创资源】
- python选股软件编写
- 带阵列卡的服务器如何装系统,带阵列卡的服务器能不能做ghost
- 1174 哥德巴赫猜想(每日学习)
- [BZOJ5109]大吉大利,晚上吃鸡!
- FPGA驱动mipi 光固化 4K屏
- android socket 推送服务版本
- 使用 Fiddler 进行小程序抓包
- 【《Real-Time Rendering 3rd》 提炼总结】(十二) 渲染管线优化方法论:从瓶颈定位到优化策略