Cannot connect to the database when accessing the site

Overview 

Users may be prevented from accessing their DNN Site, receiving the message "The connection to the database has failed, however, the application is already completely installed, a 500 error page will be shown to visitors."

 

Prerequisites

  • Access to the DNN file structure and IIS.

 

Diagnosis

By reviewing the site logs, these additional details are found:

The connection to the database has failed, however, the application is already completely installed, 
a 500 error page will be shown to visitors.

As the error message suggests, this error is caused by a connection issue to the database.

 

Solution

After verifying the above error is present in the log file, the following steps are requested to guide the user towards the resolution:

  1. Log in to the SQL Management Studio.
  2. Navigate to the Security branch, expand on Logins, right-click on the Database User and select the option Properties.

  3. Change the User's password and confirm it in the next field. Then click the OK button to save the changes.

  4. Open up the Web.config file and search for the connection string. 
  5. Change the password to reflect the updated password.
  6. Save the Web.config file.
  7.  Restart IIS using the IIS Manager.2020-09-04_15_43_07-Window.png
  8. Restart the site

 

Testing

To test that this has been resolved, access the site once again to see if the error has been generated once again.

Comments

0 comments

Please sign in to leave a comment.