I have a server hosted Blazor application that works perfectly fine in my development environment. However, when I deploy the application to Azure the server responds with "text/html" instead of "application/json".
To simplify and test this I wrote a very basic "Hello World" end point that simply replies with a json object. When I navigate directly to this endpoint from my development environment the server responds with "application/json".
When I deploy the application to Microsoft Azure and then navigate to the exact same endpoint the server responds with "text/html".
To reiterate, I'm not changing any code between environments and I'm navigating to the exact same endpoint. What am I missing?
EDIT
As a test I went and created a completely vanilla .NET Core 5 Blazor WASM Application. This is a server hosted app. When I run it locally everything works great. When I deploy it to Azure I get the EXACT SAME ERROR that I'm getting in the application I'm trying to write. To me, this is more evidence that it is something to do with how Azure Web Apps are configured or some other Azure related issue.
THIS IS THE APP WHEN I LOAD IT FROM THE SERVER:
THIS IS THE PREVIEW FROM DEV TOOLS
THIS IS THE EXCEPTION FROM THE CONSOLE
Something is clearly going on when I publish this to Azure.




