Monday, December 7, 2009

How to Encrypt a section in web.config

To Encrypt on IIS
aspnet_regiis.exe -pe "[Section To Encrypt]" -app "/[Virtual Directory on IIS]"


eg---
aspnet_regiis.exe -pe "connectionStrings" -app "/vitualdirectory"


To decrypt on IIS 
aspnet_regiis.exe -de "[Section To Encrypt]" -app "/[Virtual Directory on IIS]"


eg---
aspnet_regiis.exe -de "connectionStrings" -app "/vitualdirectory"

No comments:

Post a Comment