Wednesday, 4 April 2018

Encrypt/Decrypt Sitecore Connection Strings


It's always good practice to encrypt connection strings for your Sitecore instance to keep safe from anonymous 😇 .
Since encryption and decryption are specific to each server, so we require to run encryption on every IIS server.
Like for CD server sometimes we require to encrypt Connection strings.

So let's start demo:
firstly open command prompt as administrator and run below command

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -pef "connectionStrings" "C:\websites\sxapoc\Website"




sitecore-encrypted-connection-string-command



       that's it. Now check your connection string for selected Sitecore instance
it will look like this

sitecore-encrypted-connection-string

now to decrypt run below command

         C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -pdf "connectionStrings" "C:\websites\sxapoc\Website"



sitecore-decrypted-connection-string-command




@Note: Maybe the path will differ based on OS
either C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe
or C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe


Happy Sitecore !!!

No comments:

Post a Comment