IIS v6.2 for Windows Server 2012 & WebAssembly modules

Pavel Vinnikov 1 Reputation point


I'm trying to load some SDK module within my page. The SDK requires another .wasm module, which couldn't be loaded. It loads just fine locally, but when it comes to stage I'm getting this error:

It looks like IIS can't serve WebAssembly modules, but I did add that 'application/wasm' type to MIME types in IIS config what should make it work and it doesn't happen. I've compared both (local and stage) environments and their confings are the same. The only difference is that locally I'm using IIS for Windows 10 and on stage it's IIS for Windows Server 2012.

Can you confirm if IIS for Windows Server 2012 is able to serve .wasm files?

Internet Information Services
Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,558 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Pavel Vinnikov 1 Reputation point

    Hi @Bruce Zhang-MSFT

    Thanks for your input.

    As I wrote I added 'application/wasm' type to MIME types in IIS config, but it didn't work. But as you suggested I checked folders and bingo - this has been solved. The reason was is that due to the fact that we have a complex network hierarchy and structure, the folder was copied incorrectly, hence IIS couldn't find the file that was being requested.

  2. Limitless Technology 39,481 Reputation points

    Hi @Pavel Vinnikov

    Yes, IIS for Windows Server 2012 is a capable static file server for Blazor apps. You Need A Web. config File To Host A Blazor App In IIS.

    To configure IIS to host Blazor follow this thread https://learn.microsoft.com/en-us/iis/manage/creating-websites/scenario-build-a-static-website-on-iis

    Host and deploy ASP.NET Core Blazor WebAssembly

    The below thread discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.

    Blazor WASM on Windows 2016 Server Hosted with IIS, Authentication Token failed https://learn.microsoft.com/en-us/answers/questions/432718/blazor-wasm-on-windows-2016-server-hosted-with-iis.html

    Hope this resolves your Query!!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments