Hello,
I use The IDataProtectionProvider using protect and unprotect using dpai.
I check the key using unprotect each week when I restart my windows server and everything is fien overall but randomly after reboot I got this message :
System.Security.Cryptography.CryptographicException: The key {f07c9dae-0907-456e-8aff-a9fcb9efd25f} was not found in the key ring.
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
the key mentioned in the error is not in the DataProtection-Keys folder(i have another key)
And after a reboot everything works fine again.
After searching for a long time, I find difficult to resolve this issue.
Sincerely
Romain