Exception message: The entry 'LocalSqlServer' has already been added.

Programming, error messages and sample code > ASP.NET

.net framework uses many internal .config files (e.g. machine.config etc.) as well as there is a possiblity that you may have a parent level config file in your asp.net web.config.  When you run your application all config files are merged together  The error message is suggesting that LocalSqlServer has been already added by other config files.

I would suggest you rename  LocalSqlServer to something else like MyAppServices

Or

change connectionstring element to

<connectionStrings>
 <remove name="ApplicationServices"/>
 
 
     <add name="ApplicationServices" connectionString="data source=sqlserver host;Initial Catalog=database name;User ID=database username;Password=database pwd;"/>
 
 
 </connectionStrings>