Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Todo App fails Antiforgery #67

Open
csmithson12345 opened this issue Aug 12, 2023 · 0 comments
Open

Todo App fails Antiforgery #67

csmithson12345 opened this issue Aug 12, 2023 · 0 comments

Comments

@csmithson12345
Copy link

Hello,
Working in Chapter 4, near the end. 4.16/17. the "test" todo app was not working. a log on the db server said the "todo" database does not exist... (it does). but on the web app portion i get the following error.

looking for any suggestions, none of this is in my wheelhouse!

image

│ fail: Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery[7]                                                                                                                                                                                                                 │
│       An exception was thrown while deserializing the token.                                                                                                                                                                                                                 │
│       Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.                                                                                                                                                         │
│        ---> System.Security.Cryptography.CryptographicException: The key {8c1ccb1b-6d47-4efe-aa36-4aee9b69db0c} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning                                                                │
│          at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)                                                                                   │
│          at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)                                                                                                                                                      │
│          at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)                                                                                                                                                           │
│          --- End of inner exception stack trace ---                                                                                                                                                                                                                          │
│          at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)                                                                                                                                                           │
│          at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant