entity-framework

This operation requires a connection to the 'master' database


I have suddenly started getting an error in my 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.


Solution

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

    Hope this helps.