Antiforgery Token/Cookie Angular Web App and .Net8

Discussão em 'Angular' iniciado por user173092, Abril 7, 2025.

  1. user173092

    user173092 Guest

    Updated Project from .Net4.8 to .Net8 and I am getting


    Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery header value "temp" is not present. at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateRequestAsync(HttpContext httpContext) at namespace.ValidateAntiforgeryTokenAuthorizationFilter.OnAuthorizationAsync(AuthorizationFilterContext context)
    ​

    I found that if I debug var tokens = Antiforgery.GetAndStoreTokens(httpContext) - the cookie token is null but request token is not null

    Continue reading...

Compartilhe esta Página