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

If you receive the following application error message from your web application:

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

The solution is to modify your application's web.config file and add the following line to the connection string element:

<connectionStrings> 
<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> 

Note: You must ensure that you add the correct values for the connection string.  Log into your WinHost Control Panel and review your database information and DB login credentials in the Site Info Manager/MS SQL Manager.

Article ID: 813, Created On: 5/4/2010, Modified: 4/21/2011