Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The entry '' has already been added error

Tags:

asp.net

I have a web.config in ASP.net giving me configuration error.

 <connectionStrings>    <add name="conn1" connectionString="Data Source=test;database=test;uid=test;pwd=test"/> <add name="conn2" connectionString="Data Source=123.123.1.123;database=test2;uid=test;pwd=test"/> ... 

It throws "The entry 'conn2' has already been added." error. I know I only added it once. Not sure what it is wrong with.

like image 872
Tony Avatar asked Jul 13 '11 12:07

Tony


1 Answers

it can be in web.config that is parent to this one. just add

<remove name="conn2" /> 

before your add it (again) :)

alternatively clear all connection string using

<clear /> 
like image 158
Ales Ruzicka Avatar answered Sep 19 '22 17:09

Ales Ruzicka