Last post Dec 13, 2007 08:44 PM by Benson Yu - MSFT
Dec 10, 2007 01:52 PM|CynthiaD|LINK
I'm using a web deployment project in which I specify that it should replace the connectionStrings section of the web.config upon deployment, because we use a different connection string for remote and local.
The problem is, we are encrypting the connection string in the web.config using aspnet_regiis. So I generated an encrypted version of the remote connection string and put it in my replacement file, "conStrings.config". But when I try to compile in Release
mode, I get the following error:
web.config(12): error WDP00001: section connectionStrings in "web.config" has 1 elements but "conStrings.config" has 3 elements.
I guess the "3 elements" are the EncryptedData, CipherData, and CipherValue tags in the connectionStrings section. But the encrypted value in the web.config also has these 3 elements. Does this mean the deployment project decrypts the connection string before
How can I get it to replace the connection string with a different value, but have the different value encrypted? Is it even possible?
Dec 13, 2007 08:44 PM|Benson Yu - MSFT|LINK
Based on my test, there is an option (checkbox): “Enforce matching section replacements” under the “Web.config file section replacements” text area. I can reproduce the error if I check that option and rebuild the web deployment project. Please
uncheck that option in your deployment project. I hope it is helpful.