Cannot open database "MyBase" requested by the login. The login failed. Login failed for user 'domain\User'

Viewed 29
string connectionString ="Server=localhost;Database=StudentRate;Trusted_Connection=True;Encrypt=False;";

I have problem with connection, general with user databases, I can't connection to any. Property of login and user. I try every way, but problem wasnt's solved.

1 Answers

Try adding below string in your connection string it would help

Server=localhost;Database=StudentRate;Trusted_Connection=True;MultipleActiveResultSets=true
Related