In the first runProgramWhen you use the Entity Framework to modify or delete the database, the system always reports that this operation requires you to connect to the 'master' database. If you modify or delete the database again, this error will not occur, because Entity Framework 4 is also the first time to use this error. It took a long time to find a solution for Google. Today, it's a bit time, so I tried to find a solution in a comment reply from a foreigner.
"This operation requires a connection to
'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 ."
I had this error and solved it by adding "persist
Security info = true "to the connection string.
Persist Security info = true is added to the connection string.
Persist Security info = true
This means that. Net keeps saving the connection password. The default value is false.
I just don't understand why it won't happen again after an error
. NET will automatically save the password?