If you need to encrypt a portion of a web.config file you will need basic instructions, and the stuff on technet isn't great, and I found it to be lacking in necessary detail.
A common use is encrypting database passwords in your configurationStrings sections, which is a good idea for the sake of security.
Add this line of asp code into one of your pages to get the site ID:
<%=Request.ServerVariables["INSTANCE_META_PATH"]%>It will output something like "/LM/W3SVC/5" and the ID is "5"
http://johnnycode.com/2013/06/26/encrypting-sections-of-an-asp-net-web-config/
aspnet_regiis.exe -pa
aspnet_regiis.exe -pe
A configuration file cannot be created for the requested Configuration object.
Failed!