I need the following setup:
- When debugging my application, I want my
connectionStrings
config section to be encrypted viaaspnet_regiis
- When publishing the application, connection strings should be normal, unencrypted
<add>
elements, where the value just contains some placeholder text.
My reasoning is:
- When pushing the code to remote repo, i don't want my debug credentials to be saved there in plaintext (hence the encrypted section)
- When publishing the app to Azure, I can override the placeholder, unencrypted connection strings from azure portal
Is this possible using config transformations?
The only examples I can find transform individual connection string elements, but I need the entire section to look different depending on debug/release settings.
Appreciate any advice