Samples fail on IIS
If hosting samples in IIS, they fail because there is no mime type for the WASM extension
Samples don't work
Minimal repro steps
"Hello World" to be displayed
Page is stuck on "Loading..." screen
Further technical details
By default IIS does not have a content type for WASM extension. Adding "application/wasm" for the WASM extension fixes the issue. (I note that IIS Express uses "application/octet-stream" as the mime type, but it doesn't look like there is a standard yet.)
Even more confusing, if you add the MIME type into IIS at the Site level, upon next compilation the web.config file is cleared out, and the mime type is then cleared out. It needs to be added at the server level.
Even more confusing, the error shown in the browser console is:
Which is a bit misleading.
The text was updated successfully, but these errors were encountered:
@shirhatti That's right!
@bariscaglar I'm unsure what you mean by "both", but yes
As for this issue more generally, I no longer think there's a Blazor bug here. It turns out that publishing works fine by default without needing to configure any extra MIME type, because our
The original repro steps posted here involve pointing IIS at the unpublished
We can change any of these details in the future if we want, but I'll close this now because it no longer appears that there's a Blazor bug.