Jump to content

Database Connectivity Error


Recommended Posts


You attempt to log into Passwordstate, but you get the following error:



Potential Fixes:

This error can be caused by a few different options, and below we will list these to help you investigate the issue


Web.config file explanation:

On your Passwordstate web server, you will find a c:\inetpub\passwordstate\web.config file. You should see a connection string which includes four pieces of information - your database server and instance, database name and a SQL username and password.  An example of this can be found below:



If you cannot find these details in your web.config file, then this will mean someone he encrypted the file for added security, and you'll need to decrypt the file to be able to read it in clear text.  More about what an encrypted file looks like, and how to decrypt it can be found in this forum post: https://forums.clickstudios.com.au/topic/2699-encrypting-and-decrypting-the-webconfig-file/



Potential Fix #1

First thing to check is that the password for your SQL account in your web.config file is valid.  Using SQL Management Studio Tools, try establishing a connection to your database server using the detail from your connection string.  If the connection is refused, you will need to update the password in the web.config file to match the actual password on the database server.


Potential Fix #2

If your database resides on a separate server, check to see if there are any firewalls blocking access.  To test this, open Powershell on your web server, and run the following command, but substitute in your database server name:


Test-NetConnection -ComputerName SQLServer01.clickdemo.com -Port 1433


If this does not come back with a true result, it could mean that either a firewall is blocking access, or your SQL server is listening on a different port than the default port 1433.  To check if you are using a differnt port, open SQL Server Configuration Manager on your database server, and look for the TCP/IP connection properties.  You will see the Port number under the IP Addresses tab:




If you find that the port is different, you will need to update it in your web.config file, using this example below as a guide:



Potential Fix #3

Sometimes we have seen the SQL account password has expired.  Log into your database server using another privileged account, and deselect the password policy for the "passwordstate_user" account (this is the default account most people will use)



Potential Fix #4

Check for outstanding Windows updates that require a reboot on both your web server, and database server (assuming the database is hosted separately).  Just search for updates from the Start Menu and if a reboot is required, schedule one as soon as possible.



Potential Fix #5

If you are using SQL Replication in any capacity to replicate data between two database servers, you may be using a SQL Listener. A SQL Listener is a virtual computer in Active Directory, that makes connections to either of your databases where you are replicating data to.  If you are using a SQL Listener, try hardcoding the database server and and instance in the Connection String, in the web.config file.


Potential Fix #6

Check that the SQL Services are running on your database server:



If you still have connection issues, please log a support call with Click Studios Support: https://www.clickstudios.com.au/support.aspx






Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...