Unable to open website: Failed to login to session state SQL server for user

Created:

2016-11-16 13:08:41 UTC

Modified:

2017-08-08 13:19:33 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to open website: Failed to login to session state SQL server for user

Applicable to:

  • Plesk 12.5 for Windows

Symptoms

Unable to open website, the following error ocurred in web browser:

    Server Error in '/' Application.
Failed to login to session state SQL server for user 'username'.
[SqlException (0x80131904): Login failed for user 'username'.]

Cause

Incorrect credentials defined in website web.config .

Resolution

Define correct credentials in website web.config :

  1. Open %plesk_vhosts\\example.com\\httpdocs\\web.config% in text editor.
  2. Navigate to <ConnectionStrings> section and define correct credentials:

     <connectionStrings>
    <add name="ExampleDB" connectionString="Persist Security Info=True;Initial Catalog=example_db;Data Source=1.2.3.4;User ID=username;Password=YOURSAPASSWORD" />
    </connectionStrings>
  3. If password for user was lost, it can be changed in Plesk > Domains > example.com > Databases > User Management > username . After that updated credentials should be defined in web.config .

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