Back to Blog

    Developer Blog

    How to configure MIME types in IIS

    Foxit PDF SDK for Web

    When using IIS to run Foxit PDF SDK for WEB, we may encounter some resource file parsing errors that lead to access failure. At this time, we need to configure the MIME type of IIS.

    Let’s take Windows Server 2019 for example, here are the steps:

    1. Open the Microsoft IIS management console, then select the local compute name, and click the MIME Types item.

    image2022 11 21 21 12 59

    2. Click New or Add button.

    image2022 11 21 21 21 10

    3. In the Extension box, type .wasm, and type application/wasm to the MIME type box.

    image2022 11 21 21 17 56 1

    And here are the common MIME types that need to be configured:

    <mimeMap fileExtension=".wasm" mimeType="application/wasm" />
    
    <mimeMap fileExtension=".mem" mimeType="text/plain" />
    
    <mimeMap fileExtension=".brotli" mimeType=“application/octet-stream" />
    
    <mimeMap fileExtension=".json" mimeType="application/json" />

    4. In version 9.x, you also need to configure an additional mimetype under the lib/jr-engine/cmaps and lib/jr-engine/FoxitFonts path

    <mimeMap fileExtension="." mimeType="application/octet-stream" />
    image 2023 11 7 9 32 33