UncleCoder.com

UncleCoder.com

Free programming examples and instructions

Encrypt and Decrypt web.config file - Asp.net

Instructions for how to Encrypt and Decrypt Web.config connection strings Asp.net

by Athil


Posted on 26 Jul 2019 Category: Asp.Net Views: 2832


Here I am going to show how to Encrypt and Decrypt web.config file settings and connection strings.

For Encryption  

 

aspnet_regiis.exe –pef “<settings>” “<web.config location>”

1. Open 'Developer command prompt' in 'Run as Administration' Mode.

Encrypt decrypt web.config developer command promt

(Encrypt connection string)

2.Type ‘aspnet_regiis.exe –pef “connectionStrings” “<web.config location>”’ to encrpt connection string.

 Where settings name (connectionStrings) should be case sensitive

(Encrypt appSettings)

Web.config Encrypt success

3.Type ‘aspnet_regiis.exe –pef “appSettings” “<web.config location>” to encrypt appSettings.

Encrypted web.config file

 

For Decryption

 

asp.net_regiis.exe –pdf “<settings>” “<web.config location>”

1. Open 'Developer command prompt' in 'Run as Administration' Mode.

(decrypt connection string)

2.Type ‘aspnet_regiis.exe –pdf “connectionStrings” “<web.config location>”’ to decrypt connection string.

(Decrypt appSettings)

3.Type ‘aspnet_regiis.exe –pdf “appSettings” “<web.config location>” to decrypt appSettings.

 



Leave a Comment:


Click here to register

Popular articles