Blazor not correctly redirecting to controller on IIS

Viewed 757

I have started on a blazor-webassembly PWA project (.net 5.0-rc1), hosted on asp.net core, and is working Authentication against 3rd party services.
This login flow is based on asp.net core identity.
The flow is as follows:

  • User enters login site and chooses a provider
  • User is redirected to controller, loading provider configuration and redirects user to provider
  • User log in using provider
  • User is redirected to callback, and is logged into system, JWT is generated
  • User is redirected to PWA for handling of JWT.

When developing locally, the above flow works without any issues.
However when deploying to my webhotel, step 2 is redirected to the Blazor application, rather than the controller on the server, causing a "Not found" page.

As the server is hosting the application they share the same base url.
I have tried both a regular link <a href="..."> and navigate with Navigationmanager.NagivateTo(url, forLoad: true);

When shown the "Not Found" page, pressing F5 will result in the same page. However pressing Ctrl+F5 causes the server endpoint to be hit, and the rest of the flow works as intented.

1 Answers
Related