Tuesday, July 24, 2007

Web.Config: Encrypt Sections using Aspnet_regiis

Web.Config: Encrypting Configuration Sections through Aspnet_regiis

• Use the IIS Registration tool (Aspnet_regiis.exe) to encrypt or decrypt sections of a Web Configuration file
• Tool is located in: windows\Microsoft.NET\Framework\versionNumber\
• ASP.net will automatically decrypt the information when web.config is processed
• System.Configuration classes can also be used
• Syntax for Encrypting:
aspnet_regiis –pe “connectionStrings” –app “/SampleApplication” –prov “RSAProtectedConfigurationProvider”
• Syntax for Decrypting:
aspnet_regiis –pd “connectionStrings” –app “/SampleApplication”

No comments: