Entity Framwork: This operation requires a connection to the 'master' database... error

Serap Bircan 1 Reputation point
2021-11-16T07:46:49.757+00:00

Hi friends,

I I added a view to the database and deleted the Entity Data Model, recreated it. I then got the following error: "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.'" By the way, there is "persist security info=True" in the connection string.

Please help!

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
777 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,100 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,288 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Karen Payne MVP 35,551 Reputation points
    2021-11-16T10:35:15.993+00:00

    Try using Integrated Security=True if using windows authentication e.g.

    Data Source=localhost\SQLEXPRESS;Initial Catalog=NorthWind2020;Integrated Security=True


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.