Jon_Sadler
(Jon Sadler)
November 13, 2011, 1:44pm
1
One of my web.config properties contains something along the following lines:
connectionString="{sometext}"{somemoretext}"{evenmoretext}"
When I use the environment variables to modify this it escapes the ampersand so the value becomes this:
connectionString="{sometext}"{somemoretext}"{evenmoretext}"
Jon_Sadler
(Jon Sadler)
November 13, 2011, 1:48pm
2
Lines in the post above should read as follows without the spaces:
connectionString="{sometext}"{somemoretext}"{evenmoretext}“
connectionString=”{sometext}"{somemoretext}"{evenmoretext}"
Hi Jon,
What if you set the variable in Octopus to:
{sometext}"{somemoretext}"{evenmoretext}
This way the variable could also be used by things other than web.config (e.g passed to PowerShell later)?
Paul
From: Jon Sadler
Sent: 13/11/2011 13:46
To: Paul Stovell
Subject: Environment variables result in double escaped characters [Problems]
Jon_Sadler
(Jon Sadler)
November 13, 2011, 2:00pm
4
I have tried that and it does work, it just seems a little counter-intuitive to my mind that I need to modify my pre-existing web.config value in this way.
Anyway, I have a work around. Thanks.