How to decrypt connectionString in web.config using regiis_asp.net?

I tried using this command in cmd but it did not work

c:/path.../regiis_asp.net -pi "connectionString" -app "d:/myWebSiteApp" 

the result of this command was

configuration section "connectionString" not found failed

+7
source share
2 answers

Have you tried it like this ?:

Encryption:

 aspnet_regiis.exe -pef "connectionStrings" C:\path\to\application 

Decrypt:

 aspnet_regiis.exe -pdf "connectionStrings" C:\path\to\application 
+32
source

If you intend to decrypt the connectionStrings section in the web.config file, you will need to use the command below.

 aspnet_regiis -pdf "connectionStrings" -app "d:/MyWebsiteApp" 

Note: in the code you submit, pay attention to the following

1) aspnet_regiis utility command instead of regiis_asp.net

2) Since your application refers to the physical path, the container configuration should be -pdf instead of -pi

3) The name of the connectionStrings section instead of connectionString (note s )

If you are trying to decrypt the virtual path, the command should be lower

 aspnet_regiis -pd "connectionStrings" -app "/MyWebsiteApp" 
+1
source

All Articles