Mark Mark -4 years ago 693
ASP.NET (C#) Question

This operation requires a connection to the 'master' database

I have suddenly started getting an error in my MVC 4 web application.

The error is:

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.

Nothing has changed in the code - and database access is fine throughout the rest of the code.

It stops on this line:

var filteredContacts = dc.EAContactLists.Where(o => teams.Contains(o.Team)).ToList();

I am lost on this one.

Thanks for any advice,


Answer Source

Try setting Persist Security Info = True in your connection string.

Hope this helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download