Use the command line tool aspnet_regiis.exe to encrypt and decrypt web. config

Source: Internet
Author: User

Last time I used the sectioninformation class to encrypt and decrypt the Web. config file. Here I will introduce you to another method to encrypt and decrypt web. config.

The command line tool aspnet_regiis.exe is a DOS-like command tool called the command interpreter. When you use the command line tool to encrypt and decrypt database connection strings in the web. config file, you only need simple syntax commands.

Encryption Syntax:
Aspnet_regiis-VF "configuration node to be encrypted" "absolute path of the web. config file"
Decryption Syntax:
Aspnet_regiis-PDF "configuration node to be decrypted" "absolute path of the web. config file"

Implementation process:

Pre-encryption string

(1) Open the "Visual Studio 2005 command prompt" (start the method -->Program--> Microsoft Visual Studio 2005 --> Visual Studio Tools --> Visual Studio 2005 command prompt), enter the command prompt aspnet_regiis-Arg "etettings" "D: \ webconfig, press enter.

(2) Open "Visual Studio 2005 command prompt", enter the command prompt aspnet_regiis-PDF "etettings" "D: \ webconfig", and press Enter.

Complete!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.