Web.Config Transforms

Hi support Team,

               I have a general question while using Octopus Deploy for Deploying an ASP.NET Web Application. I have a requirement of deploying to 3 environments but with different configrations like some appSettings and ConnectionStrings. As of now i am creating variables in Octopus and making the scope of the variables to the particular environment and deploying, it is working fine. But i need to know is there any other best practice to be followed in order to perform my actions.

Thanks,
Sathya

Hi,
Thanks for dropping us a line, we hope you are enjoying using Octopus Deploy.
Reading through your question it sounds like you already have a great grasp on how to structure your deployment projects. Using variables scoped to environments are the recommended way to deploy the same project to multiple environments but with modifications to their configuration values. To perform the changes to your configurations, we have outlined some recommended approachs in our documentation.

By using the octopus deploy variable substitution syntax (e.g #{MyVariable}) in your app.config or web.config in conjunction with the Configuration variables feature, Octopus Deploy can replace them with variables scoped to your deployment context.
Alternatively you may prefer to leverage the web transform feature to perform XSD transformation of your configurations, again taking into account variables by using the Configuration transforms deployment feature.
Take a look through the documentation and see what best fits your project.
Let me know if you have any further questions to get you on your way to deploying using Octopus Deploy.
Robert

Hi Rob,

Thanks for your fast reply, i am happy that, i got totally 3 ways of doing the same operation. But can you please give me some clarification regarding the security of the configuration data i am providing in the variables. This will be a great information for me.

Thanks,
Sathya

Sathya,
When you configure your variables you can define them as sensitive. As out documentation indicates these are stored encrypted in the database. Also if any of your steps happen to output these values to the logs, they will be obfuscated so they cannot be read.
Hope that information helps,
Cheers,
Rob

Hi,

That’s really great,Thank you so much.

Thanks,
Sathya