Share via

Error When Upgrading a Blazor App to .Net 10

Yaseen Shaikh 20 Reputation points
2026-01-28T14:45:10.1+00:00

Hello,

When upgrading my app(s) to .net 10 from .net 8, I encountered an error that looks like this:

User's image

This exception is seemingly thrown from blazor.webassembly.js.

In the browser DevTools tab console, we can see the following errors:

User's image

The apps are both Blazor apps using a Duende BFF previously on .net 8. The only thing that was changed to cause this issue is changing the target frameworks to .net 10, and then this issue immediately began occurring.

What caught my eye is the strange path being attempted, being the localhost:7074/0 - that /0 path is not specified anywhere in my source code. However, it could also be a red herring error resulting from something else.

Things I have tried:

Upgrading MudBlazor to 8.15 did not yield any change to the errors

Upgrading all NuGet packages did not fix the issue.

In Program.cs, changing app.UseStaticFiles() to app.MapStaticAssets() did not fix the issue either.

Having repeated this issue over two separate apps that are set up the same way, this doesn't appear to be an isolated issue. Any help or guidance through solving this would be much appreciated!

Developer technologies | .NET | Blazor

Answer accepted by question author
  1. Jack Dang (WICLOUD CORPORATION) 16,515 Reputation points Microsoft External Staff Moderator
    2026-01-29T10:15:11.29+00:00

    Hi @Yaseen Shaikh ,

    Thanks for reaching out.

    The /0 path is likely just a side-effect of the crash. One possibility is that after upgrading to .NET 10, your Blazor WebAssembly app might not be receiving its runtime files (blazor.webassembly.js, dotnet.js, .wasm) correctly. In that case, the browser could be getting HTML (usually index.html) instead, which would prevent the runtime from starting and could produce the “Exception Unhandled: 0” error. I suggest you read Bruce's answer to be aware of these changes.

    This could explain why you see:

    • Crashes inside blazor.webassembly.js
    • MIME type errors in the browser console
    • Your own app code never running
    • The unexpected /0 request

    Some things you might want to check:

    1. Ensure static files are mapped before any BFF or SPA fallback routes.
    2. Use the browser Network tab to confirm .js and .wasm files are actually served, not HTML.
    3. Check that <base href="..."> matches your hosting path.
    4. Make sure Blazor runtime files (_framework/*) aren’t caught by catch-all rewrites.

    If the runtime files load correctly, the crash and /0 requests would likely disappear.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 83,741 Reputation points
    2026-01-28T22:59:56.22+00:00
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.