打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Entity Framework 4 此操作要求连接到 'master' 数据库错误解决方案

Entity Framework 4 此操作要求连接到 'master' 数据库错误解决方案  

2010-11-03 15:52:00|  分类: 沛^_^芳_程序 |  标签:entity  framework  4  master   |举报 |字号 订阅

在第一次运行程序时,用Entity Framework进行修改和删除时总会报一次 此操作要求连接到 'master' 数据库错误 
再次修改或者删除就不会出现此错误 
因为Entity Framework 4也是第一次使用  这错误也找了很久 
今天有点时间,就耐着性子去google解决办法
找了很久 最后在一个老外的评论回复里找到解决办法

"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."

I had this error and solved it by adding "Persist Security Info=true" to the connection string.

意思是在连接字符串上要加 Persist Security Info=true

Persist Security Info=true 的意思是让.net一直保存着连接密码,默认是为false的

只是不明白 为什么在出现一次错误后 第二次就不会出现 难道出现过错误 .net就自动把密码给保存上了?

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
SqlConnection.ConnectionString 属性
delphi连接sql server的字符串
ADO.NET远程访问Access数据库的连接字符串
Showing a Connection String prompt in a WinForm application
web.config connectionStrings 数据库连接字符串的解释
关于java nanohttpd服务器的post 传参数,取参数
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服