Website cannot connect to MSSQL database server


2016-11-16 12:41:03 UTC


2017-08-16 16:53:01 UTC


Was this article helpful?

Have more questions?

Submit a request

Website cannot connect to MSSQL database server

Applicable to:

  • Plesk Onyx for Windows
  • Plesk 11.x for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows


1. The following error occurs on attempt to access a website developed with ASP.NET:

Cannot open database "mydatabase_name" requested by the login. The login failed.
Login failed for user 'qwerty'

2. ASP.NET website keeps loading and get connection error


The database user cannot connect to the database due to an incorrect password or database connection settings is misconfigured in ASP.NET Settings for the domain .


  1. If the connection to database is managed though the web.config file in the site's document root ( D:\\inetpub\\vhosts\\domain.test\\httpdocs ), find the section connectionStrings in web.config :

    <add name="QweConnectionString" connectionString="Server=\\MSSQLSERVER2008;
    Database=mydatabase_name;Uid=qwerty;Password=1qazXSW@" />
  2. Set the password of the database user through the Parallels Plesk interface (at Websites & Domains > Databases > Users > username ) to the same value as in web.config .

  3. Check that database server specified in connectionString parameter exists and configured properly.

Have more questions? Submit a request
Please sign in to leave a comment.