Last active
July 19, 2018 20:24
-
-
Save weirdpattern/e469c17d3efb899a1cadfc58ca35377a to your computer and use it in GitHub Desktop.
.2016.11.01.encrypt-config-file-application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016.11.01.encrypt-config-file-application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given a configuration fle like | |
# <configuration> | |
# <configProtectedData> | |
# <providers> | |
# <add name="MyProtectedConfigurationProvider" | |
# type="System.Configuration.RsaProtectedConfigurationProvider, ..." | |
# keyContainerName="MyKeyContainer" | |
# useMachineContainer="true" /> | |
# </providers> | |
# </configProtectedData> | |
# </configuration> | |
$ cd "$env.WINDIR/Microsoft.NET/Framework64/v4.0.30319" | |
$ .\aspnet_regiis -pe connectionStrings -app "/Default Website" -prov MyProtectedConfigurationProvider | |
Microsoft (R) ASP.NET RegIIS version 4.0.30319.18408 | |
Administration utility to install and uninstall ASP.NET on the local machine. | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
Decrypting configuration sections... | |
Succeeded! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aspnet_regiis -pe <section> -app <virtualPath> [-location <subPath>] -prov <provider> [-pkm] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment