Connection to database fails-DNN error

While accessing your DNN application in the web browser if you face Connection to database failed error, then there will be several possibilities for this error

Majorly this error occurs due to incorrect connection string in web.config file, you have to make sure that the database details you are entering in coding is matching with the database. Here is the sample of DNN connection string is mentioned below:

<connectionStrings>

<add name="SiteSqlServer" connectionString="Data

 Source=SERVERNAME;Initial Catalog=DATABASENAME;User

ID=DATABASEUSER;Password=PASSWORD"

providerName="System.Data.SqlClient" />

</connectionStrings>

 

Another possibility is the use of special characters in the password:

You have to make sure that you have created a database password based on passwordregulerexpression and strength, you can reset database password and you have to enter the updated password in web.config file.

Another reason may be the database service is down OR under maintenance, you have to confirm this with your hosting service provider.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SQL server- network related or instance-specific error happened while connection establishing

  Instance-specific or network related error happening while connecting to SQL server   Please...

OleDB connection string examples

OleDB connection string examples MS Access (Jet) "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA...

Do you allow custom COM components?

Do you allow custom COM components? We are not offering to install the custom COM components...

Error when accessing a WCF services

Error when accessing a WCF services Error when accessing a WCF service: "IIS specified...

How to cache static contents to client with UseMaxAge?

You can consider to caches static contents to the client with UseMaxAge if your website has too...

Powered by WHMCompleteSolution