We're using aspnet_regiis to encrypt our web.config (and other app.config files). It works if I encrypt it on our webserver, but I need to be able to encrypt the file on another server and deploy it.
I know how to do this, and it works with our other config files on other servers that aren't under IIS. I also tested it by encrypting the file on the web server to make sure the problem wasn't the encryption process in general. The problem seems to be that the IUSR user doesn't have permission to access the key container. When I try the command:
aspnet_regiis -pa "MyKeyContainer" IUSR
It fails with the warning, "The specified username is invalid."
We are using IIS 7. Should we run IIS under a different user instead of IUSR to get this to work? Am I doing something else wrong?