When using the “Configuration variables” to update the connectionstrings of my release it is encoding the “&” within the SQL users password.
e.g.
variable:Password value:P&ssword
once the config file has update I get “P&ssword”.
Is this intended behaviour and if so is there a way to override it?
Thanks for reaching out. The Configuration Variable should apply the raw value of the variable into the config file. Could you send us the following info:
screenshots of how the variable looks like on your Project (same thing you sent already, but on a screenshot)
complete line of your config file after the update. You might wanna run a mock deployment here with fake data that also uses the “&” character
Version of Octopus you are running
I’ve set the conversation as private so only you and our staff can see its contents.
Unfortunately I can’t use variable substitution at the moment as the development team set the connection string as a valid connection for their local machine. I use the Configuration variables option to replace the entire connection string.
As you could see from my variables I build the connection string from multiple variables as I need to have the password as sensitive. However even if I include the password in the connection string it still encodes it.
Can you re-do your testing to match how I’ve done it and see if your implementation encodes the variables.
Into a Visual Studio configuration file, VS will even show that the “&ssword” is invalid markup. Replacing it with & is the correct behavior here if you want the password to work.
I’m getting a similar issues. I’m substituting a connection string in azure using the ‘configuration variables’ in octopus v3.1.1 for a web app. The azure connection string contains a “”" but octopus is converting this to “"”
i’ve just hit this issue with an Entity Framework connection string. There is no choice here because the EF connection string format uses " which gets rendered to the web.config as "
I ended up refactoring the code to supply the connection string manually from another config setting. It would be great if it could be fixed in Octopus Deploy though.