Start a conversation

The connection name 'LocalSqlServer' was not found in the applications configuration.

You are trying to setup dnn 7 and receive the following error:

Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

FIX:

In your web.config file add the following to the "connectionStrings" section of your web.config file:

<remove name="LocalSqlServer" />
      <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />

Your "connectionStrings" section should look like this:

<connectionstrings>
   
    <add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient"/>
   
      <remove name="LocalSqlServer" />
      <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Senior Engineer Jessie

  2. Posted
  3. Updated

Comments