Connection strings, variables and "" characters

Hi all. Maybe it’s lack of coffee or too much coffee, but I’m not able to understand how to get my connection string added as a variable due to it containing double quotes all over the place, which I need to retain.

I have the following

octopus variable definition
"Data Source=server;Initial Catalog=DATABASE;uid=anaccount;pwd=apassword" name=“DATABASE” providerName=“System.Data.SqlClient”"

config file addition
"Data Source=serverInitial Catalog=DATABASE;uid=annccount;pwd=apassword" name=“DATABASE” providerName=“System.Data.SqlClient”"" name=“DATABASE” providerName=“System.Data.SqlClient”

what I need added is exactly what is defined in the variable. I know this is possible because we have it for 4 other servers, however due to the password in there, they were marked sensitive :frowning:

I’ve read this thread

and I’m not able to determine from that how to achieve the output I want.
Is there an escape character I’m missing ?


Thanks for reaching out. To confirm, is this the exactly what you need to see on your web.config after the deployment?

    <add name="connectionstring" connectionString="Data Source=server;Initial Catalog=DATABASE;uid=anaccount;pwd=apassword" name="DATABASE" providerName="System.Data.SqlClient"/>    

If not, please send me the exact output you need, including the parent xml nodes.

Best regards,