IIS Express allows many file extensions to be served by default but it lacks a few very useful extensions such as JSON and fonts extensions (FontAwesome!). 

There are two ways we can add mime types, XML or command line: 

Going the XML route

  • Open ApplicationHost.config located in C:\Users\<user>\Documents\IISExpress\config
  • Locate staticContent section and append the following lines before the closing tag:
    <mimeMap fileExtension=”.json” mimeType=”application/x-javascript” />
    <mimeMap fileExtension=”.svg” mimeType=”image/svg+xml svg” />
    <mimeMap fileExtension=”.svgz” mimeType=”image/svg+xml svgz” />
    <mimeMap fileExtension=”.woff” mimeType=”application/x-font-woff” />

Going the Command Line route

  • Open the command line with administrator privileges.
  • Navigate to the IIS Express Directory. By default it is located under C:\Program Files (x86)\IIS Express
  • run the following commands:
    appcmd set config /section:staticContent /+[fileExtension='.json',mimeType='application/x-javascript']
    appcmd set config /section:staticContent /+[fileExtension='.svg',mimeType='image/svg+xml svg']
    appcmd set config /section:staticContent /+[fileExtension='.svgz',mimeType='image/svg+xml svgz']
    appcmd set config /section:staticContent /+[fileExtension='.woff',mimeType='application/x-font-woff']

Following the same pattern you can add any MIME type you need!