My question is: why does the machine key obtained by this function return a different value each time I restart my Azure web roles in the Azure Compute emulator? I have hard code generated by a machine key in my Web.config for this role - should this not be enough?
var cfg = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath);
var machineKey = (MachineKeySection)cfg.GetSection("system.web/machineKey");
What is the proper way to handle this in Azure web roles?
I use my machine keys to hash user data, so it is important that I do not have dynamic machine keys: p
source
share