Open Closed

Error 400: "RequestVerificationToken" is not present in Abp 5.3.2 #3396


User avatar
0
hakan.uskaner created
  • ABP Framework version: v5.3.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

I tried this on a new generated microservice-template..: Stepts to reproduce:

  • generate a microservice solution: abp new AppMicro -t microservice-pro -u blazor-server -csf
  • run solution with powershell .\run-tye.ps1
  • open product service api and authenticate with WebGateway_Swagger account
  • Try a get on products --> this works fine
  • Try to post a new product -> Error 400

I receive this error:

Seems like the antifogery token is not set properly? i also checked permissions in gui and granted WebGateway_Swagger all permissions. No change.

What i am not getting here ~ ?


8 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    open product service api and authenticate with WebGateway_Swagger account

    Refresh the swagger API page works?

  • User Avatar
    0
    hakan.uskaner created

    Yes this works fine. also cleared all cookies in browser. If i generate a product from blazor app menu the product is created fine.

    but in swagger i receive the above error. Same swagger problem also with the other services.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I got this, I will try to refresh the swagger page after the authcatation.

  • User Avatar
    0
    hakan.uskaner created

    No, sorry a page refresh wont change something. There error still persits. i did misunderstood you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok I will check it again

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please try to replace all UseSwaggerUI with UseAbpSwaggerUI in your project.

  • User Avatar
    0
    hakan.uskaner created

    Yes, this fixed it. Can you explain why ? Will it be replaced in the template or through abp-cli for future ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Yes, We will update this in the next patch version.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19