After some time troubleshooting, I finally figured out what was going on.

It turns out there was a configuration in the code which changed the root path for angular files.

services.AddSpaStaticFiles(configuration =>
{
     configuration.RootPath = "AngularApp/dist";
});

And it seems that IIS was just ignoring any general configuration for this folder.

I had to create a virtual directory for the assets folder, and add the MIME types configuration inside a new location tag.

So, my web.config now looks like this.

<configuration>
...
 <location path="assets">
   <system.webServer>
       <staticContent>
           <mimeMap fileExtension=".dma" mimeType="application/octet-stream" />
       </staticContent>
    </system.webServer>
 </location>
</configuration>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top