Skip to main content

Decrypting Data That Has Been Encrypted by ASP.NET

A colleague of mine let me know about an easy way to use .NET's decryption mechanism from the command line. From the directory of the framework version, issue the following command (replace filename and path where appropriate):

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -pdf "filename" D:\path\
Encrypting configuration section...
Succeeded!

Neat!