Avoid returning index.html for API calls

While writing an asp.net hosted Blazor WASM app, I’ve noticed that when I call an API on my server I receive the contents of index.html when I am expecting a 404 error. TL;DR Explanation When you first request a URL from the host and nothing is found at that address, the server will serve the …
Continue reading Avoid returning index.html for API calls

Viewing Blazor auto-generated code

When you build an app with a .razor component in it, the compiler will auto-generate code to build the render tree. If you want to see the generated code you can edit your .csproj file and add the following to your <PropertyGroup> node. After you build your application, look in the obj folder that is …
Continue reading Viewing Blazor auto-generated code