Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery cookie ".AspNetCore.Antiforgery.9TtSrW0hzOs" is not present


Question: How do you resolve the error in .Net 5 Login: Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery cookie ".AspNetCore.Antiforgery.9TtSrW0hzOs" is not present


Login to See the Rest of the Answer

Answer: 
Asp.Net Core doesn't generate anti-forgery tokens for safe HTTP methods, one way to solve this error is to include a built-in Action Filter on the Loggin Action called [AutoValidateAntiforgeryToken]. This will allow the Framework to decide when to validate an AntiforgeryToken.







For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email AddressContact: [email protected]