Knowledgebase: DotNetNuke
The connection name 'LocalSqlServer' was not found in the applications configuration.
Posted by Sean Syed on 25 November 2013 10:39 PM

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>
    <!-- Connection String for SQL Server 2008/2012 Express -->
    <add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient"/>
    <!-- Connection String for SQL Server 2008/2012
    <add name="SiteSqlServer" connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;" 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" />

  </connectionStrings>

(1 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).