I have suddenly started getting an error in my application.
The error is:
This operation requires a connection to the \'master\' database. Una
Make sure you aren't running Fiddler. Temporarily disabling traffic capture with F12 resolved the issue for me.
For me the issue was that my password contained an &
sign.
Try setting Persist Security Info = True
in your connection string.
Hope this helps.
Hello actually this problem persist if you are trying to make changes in the schema like creating the table or altering some object...
And you don't have privileges to do that..
If you are working with MVC and your database already exit in the server than this problem can be solved with the code
Database.SetInitializer<EmployeeContext>(null);
just add this code in the Global.asax file in the application_start Event method.
I am so stupid. I faced the same error and then I realized that I was running the update-database -verbose command in Package Manager Console in Release mode when I hadn't configured the transformations for release mode.
Here is the connectionstring format that worked for me in Debug mode.
Password=dumbeldore;Persist Security Info=True;User ID=johnmcclain;Initial Catalog=DB_diehard400;Data Source=killthatbill;
Add Integrated Security=True
for windows authentication.This worked for me.