此操作需要的“主”数据库的连接 [英] This operation requires a connection to the 'master' database
本文介绍了此操作需要的“主”数据库的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我突然开始在我的asp.net MVC 4 Web应用程序收到一个错误。
I have suddenly started getting an error in my asp.net MVC 4 web application.
该错误是:
此操作需要的主数据库的连接。无法因为原来的数据库连接已经打开和凭证已经从连接字符串中删除创建的主数据库的连接。提供一个未打开的连接。
一切都没有改变 - 而数据库访问是整个code其余细
Nothing has changed in the code - and database access is fine throughout the rest of the code.
它停止在这条线:
var filteredContacts = dc.EAContactLists.Where(o => teams.Contains(o.Team)).ToList();
我迷失在这一个。
I am lost on this one.
感谢您的任何建议,
标记
推荐答案
尝试设置坚持在连接字符串中安全信息=真。
Try setting Persist Security Info = True in your connection string.
希望这有助于。
这篇关于此操作需要的“主”数据库的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文