Database Connection Failed!

The database connection for your site failed. Check your connection string in the web.config file to make sure the database name, server, username and password are all correct.

How to Fix This Error

Check all the details of your database connection string. The username, password, database and server names. We recommend using SQL logins instead of trusted windows authentication unless you are an advanced user. Your database connection string should look something like this example:

server=sql001.MyHost.com;database=Bvc5;uid=MyUsername;pwd=MyPassword;

The database connection string is located in your web.config file which is in the root folder of your web site. You can open and edit this file with any text editor like Notepad, Wordpad or TextEdit on the Mac.

Look for the 'ConnectionStrings' section of the file. The line will look like this:

<add name="Bvc5Database" connectionString="Data Source=sql001.MyHost.com;Initial Catalog=Bvc5;User ID=MyUserName;Password=MyPassword"/>

Make changes and then save the file back to your web site. Refresh your web site in your web browser and see if the error goes away.

If you are certain that your connection string is correct, check the permissions for your SQL username on the database server. Your account needs to have db_owner permissions or at least permissions to read the database and execute all stored procedures.

More Information

If you are having trouble finding the exact right connection string a good resource is ConnectionStrings.com