Razor pages always gives 404 unless using dotnet run

Viewed 89

I have a razor pages project that until recently worked fine, and on a colleagues computer works fine. On mine however, when running from Visual Studio or publishing to Azure via Visual studio it returns 404 for every page. Everything works as expected if I bypass Visual Studio and use dotnet run instead. Interestingly, previous commits that worked fine for me also now have the same problem. Which leads me to think its something environmental, but I can't track the cause down.

1 Answers

I also faced the same issue .

  • Try to use dotnet build instead of dotnet run.
  • Also check you map the path in azure configuration for your application in the azure app service
Related