vrijdag 19 maart 2010

How to : Encrypt / Decrypt sharepoint web.config file

When using security information in your config file. It's recommended to encrypt that part of the config file. Below you will find the steps how to configure sharepoint to use the encrypted web.config.


1) Add the next config part just under the config section of the web.config.



2) Encrypt the certain part of the config file.

aspnet_regIIS -pef "Section" "path"

3) Create an leycontainer.

aspnet_regIIS -pc "KeyContainerName" -exp

4) Add Application Pool user to the security of the key container.

aspnet_regiis -pa "KeyContainerName" "Application Pool User"


See also : Walkthrough: Creating and Exporting an RSA Key Container