How to solve error : The key {#} was not found in the key ring.

Romain Floupin/AC 25 Points de réputation
2024-03-11T10:05:51.96+00:00

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

C#
C#
Langage de programmation orienté objet et sécurisé au niveau des types, qui prend ses racines dans la famille des langages C et inclut la prise en charge de la programmation orientée vers les composants.
10 questions
0 commentaires Aucun commentaire
{count} votes

Réponse acceptée
  1. Omar Kefi (Convergys Corporation) 340 Points de réputation Fournisseur Microsoft
    2024-03-12T20:45:27.2966667+00:00

    Bonsoir,

    Merci d'avoir sollicité la communauté Q&A France.

    voici un cas similaire.

    The key was not found in the key ring. Unable to validate token

    Cordialement,

    Omar

    ,Si cette réponse a répondu à votre question, veuillez « Accepter comme réponse » et voter en utilisant « Pouce levé » afin que la pertinence de ce message s’améliore lorsque quelqu’un dans la communauté recherche une requête similaire.v

    0 commentaires Aucun commentaire

1 réponse supplémentaire

Trier par : Le plus utile
  1. Romain Floupin/AC 25 Points de réputation
    2024-03-12T21:18:13.2066667+00:00

    Bonsoir, Après De plus amples vérification le service technique pour manque d'espace effacait le profil utilisateur quand le serveur manquait d'espace disque. Merco pour votre réponse et bonne soirée

    1 personne a trouvé cette réponse utile.
    0 commentaires Aucun commentaire