I am adding encryption to my build process for a public EPiServer
site using MSBuild
and aspnet_regiis
. Mostly, it is going well, but not when encrypting the episerver
tag in web.config.
The command:
aspnet_regiis -pef "episerver" "C:\Path\to\my\site" -prov "RsaProvider"
On my dev machine (where EPiServer is installed) it runs without problem, but on my build machine (where it's not installed), I get this:
Could not load file or assembly 'EPiServer.Configuration, Version=6.1.379.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The system cannot find the file specified.
Other tags, like connectionStrings
are getting correctly encrypted on the build server, so all the keys and access are in place.
My guess is that it is due to EPiServer not installed on the build server, but is it really necessary to install EPiServer to be able to encrypt web.config? I thought the encryption only would read the web.config and encrypt the text in selected tags?
Any tips on how to get my build server to encrypt the episerver
tag in web.config would be appreciated.