connection strings are getting removed


While using webconfig_apply, the command is adding the connection strings to the web.config file. Where as the connection string entries are not getting removed while using webconfig_remove command. The following are entries in the xml file.
<Value><![CDATA[<connectionStrings />]]></Value>
<Value><![CDATA[<add name='pubsConnectionString' connectionString='Initial Catalog=pubs;User Id=sa;password=p@ssword;Data Source=.\SQLEXPRESS' providerName='System.Data.SqlClient' />]]></Value>
Please look in to this.
Closed Sep 18, 2009 at 11:13 PM by richfinn


subhashkotu wrote Jul 14, 2009 at 7:41 AM

sorry. the title should be "connection strings are not getting removed".

richfinn wrote Jul 31, 2009 at 3:29 PM

This is not due to a bug, but rather the order in which the items are being removed. Since you are removing the <connectionStrings/> section before you are removing the <add/> item, it doesn't know what to do. Try creating a second file used for the remove command that first removes the <add/> item, then removes the <connectionString/> section...

wrote Sep 18, 2009 at 11:13 PM

wrote Feb 2, 2013 at 4:06 AM

wrote May 15, 2013 at 3:07 AM