skip to Main Content

I get this error when I upload the website on the server, ie parallels plesk server. I create the tables on the plesk server and selects SQL server 2012. But I think this is a connection string error. If you know about this error please guide me.

Server Error in ‘/’ Application.
Login failed for user ‘db123’.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user ‘db123’.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

2

Answers


  1. The Error say you are trying to connect to SQL Server with user db123 which is not exists or exists but you provide wrong password.

    To fix the problem

    • check if the db123 login exists on your SQL Server from plesk panel and is exists in your database users
    • Open your web.config file to find the connection string section and see the passwrod, then check if the password of db123 login is the same or not
    • Try connect to you SQL server (on host) from your local SQL Server Management Studio with the user and password which is provided in your web.config to see that everything is fine or not
    Login or Signup to reply.
  2. The problem definitely is from the login credentials. But check to see if you are using Windows authentication.

    If you used a default instance during the installation of SQL Server Express, then in the connection string at web.config, clear the username and password portion and set integrated security to true. That worked for me.

    With my problem, the SQL server login panel had a user name, but since I was using the default instance, ASP.net did not recognize the username as a valid one even though in principle it was supposed to work. So check integrated security and set it to true. It might work for you

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search