How do you create an entry in the registry (HKEY_LOCAL_MACHINE) of an Azure Website? The web application only needs to read the entry.
You can't do this in Azure Web Sites.
if your application absolutely needs an access to Registry, you must target Azure Web Role (classic Cloud Service).
The following page states the common baseline OS functionality for all apps running on Azure App Service and includes a section on "Registry access": https://azure.microsoft.com/en-gb/documentation/articles/web-sites-available-operating-system-functionality/
Apps have read-only access to much of the registry of the host VM. However, no access whatsoever to the HKCU hive is supported and write-access to the registry is blocked (as at 26/01/2016).
来源:https://stackoverflow.com/questions/19768929/how-to-create-an-hklm-entry-in-azure-website