There is a really simple to do it:
- go to "command prompt"
- type: cd "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\" (which every your drivespace is)
- type: aspnet_regiis.exe -pef "<Name of node to encrypt>" "<Full path to web.config>"
Your done.
Edit post:
It was really that simple when i do it on my development server. But when i do the same thing on the SIT server, i was thrown with: "The RSA key container could not be opened"
Solution for me:
- Ensure that you have permission to use the keys in "C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys"
- Check the keyContainerName in "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config"
- go to "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" type aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT AUTHORITY/NETWORK SERVICE"
I'm assuming you are using the default name for NetFrameworkConfigurationKey.
Then go to the top of the post to do the encryption again.
Good luck.
No comments:
Post a Comment