Hello Folks,
I have used System.Web.Security.MachineKey.Encode('mydata', MachineKeyProtection.All) API to encrypt a piece of information stored in XML file. This seems to work fine but under certain configurations which are not known System.Web.Security.MachineKey.Decode('encrypted data', MachineKeyProtection.All) fails to decrypt data if APP POOL RECYCLES
I am trying to figure out the minimum required configurations needed to make it work. I know machine key can be fixed in web.config and it will work but in my case I want to use Windows manged auto generated keys. Ideally the API should work without any problem since IIS application pool is running against App Pool Identity. For windows 8 install it works if I enable Load User Profile option. But on Windows Server 2008 R2 with IIS 7.5 it does't work regardless of Load User Profile enabled/disabled.
I would be grateful if someone could point me to any direction where I may get some idea about requirements needed for MachineKey API to work properly.
Thanks