Closed fwhenin closed 4 years ago
We are currently facing a similar issue with Machine.UnProtect on our webroles. We made sure that the same machine key and the purpose is used at all the webroles. We are using 3.0.0 of Microsoft.Owin.Host.SystemWeb But this error occurs intermittently. Any pointers what could be the issue?
Do you have multiple cookie middleware? It's possible the wrong one is trying to decrypt the cookie: https://github.com/aspnet/AspNetKatana/blob/8cda3619132b7d1c31392ccc38ef4bb6bac92a89/src/Microsoft.Owin.Security.Cookies/CookieAuthenticationMiddleware.cs#L45
Hi, I haven't been able to get past this point. we first found this issue when we realized the sliding expiration isn't working at all. brought the code in from Github to test and found that the MachineKey.Unprotect(protectedData, _purposes) is throwing a Cryptographic Exception with the message "Error occurred during a cryptographic operation". I tried using NEW Machine Keys with the same issue. also, the .Protect(userData, _purposes) method is running just fine. anybody see this issue?