Search code examples
c#blazorblazor-webassembly

Blazor WebAssembly, don't use MIME Type application/octet-stream


Blazor WebAssembly creates .dll Files, which it downloads to a Client Computer and runs the website with. You can also make it create .bin files instead of .dll files when publishing, which is what we do. Both .dll and .bin are of MIME Type "application/octet-stream"

We see a surge of forward proxies and firewalls that block the MIME Type "application/octet-stream", which makes Blazor WebAssembly not work anymore. Customers of ours that block this MIME Type, can't access the Application anymore

Is there any way, to serve Blazor WebAssembly files with a different MIME Type, that hopefully isn't blocked by most Firewalls and forward proxies?

Update:

We changed all the applications that were affected by this from Blazor WebAssembly to Blazor Server, while still using .NET 6. We tried .NET 8 preview, but it was still too buggy.


Solution

  • In Blazor 8 the standard packaging will be webcil.

    I'm not sure if that overcomes your mediatype problems but it is probably the best that can be done.

    It's not spelled out anywhere that I can find but I assume it's going to use application/wasm.

    When a firewall blocks that you're probably at the end of the road.