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.
The Master database is the primary configuration database in SQL Server. It contains information on all the databases that exist on the server, including the physical database files and their locations. The Master database also contains SQL Server's configuration settings and login account information.
You can do this with SSMS . If you browse to the tables overview in the object browser and then select the object browser detail pane, you can sort on e.g. table create date and select all the tables you want to drop. check the checkbox "continue on error" and then hit your delete button.
The master database records all the system-level information for a SQL Server system. This includes instance-wide metadata such as logon accounts, endpoints, linked servers, and system configuration settings.
Try setting Persist Security Info = True
in your connection string.
Hope this helps.
I had this issue and in my case resolved it by adding "Integrated Security=True" to the connection string. This only applies if you're connecting to the DB using Windows Authentication. Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With