The underlying provider failed on Open

When you get the following error message in Microsoft Visual Studio 2013 check the inner exception.

System.Data.Entity.Core.EntityException was unhandled
  Message=The underlying provider failed on Open.

The inner exception gives you detailed information on the real cause of the error. Most of the time the inner exception is the following:

InnerException: System.Data.SqlClient.SqlException
       Message=Cannot open database “…” requested by the login. The login failed.
Login failed for user ‘…’.
       Source=.Net SqlClient Data Provider

Check the rights of the user. Most likely the specified user does not have access to the database.


One thought on “The underlying provider failed on Open

Leave a Reply