# Windows IIS Local Deployment Guide for HandDriver WebClient

## 1. Install IIS Server

Press the Windows key to search for "Control Panel" and open it.

<figure><img src="/files/kqjRe82ijQ4mCn3nAPkY" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/J64tkxszfFvgEInUgp3v" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/ukJycypFqtIJ0zMhrF9L" alt="" width="188"><figcaption></figcaption></figure>

After completing the above settings, click "OK" to begin downloading and installing the IIS server.

## 2. Search for IIS Manager and Open It

<figure><img src="/files/gSuZDQmsQAgyOt3rz6Vr" alt="" width="563"><figcaption></figcaption></figure>

## 3. Configure IIS Server

Select "Websites", then right-click and choose "Add Website".

<figure><img src="/files/rDAD3Ym4iNg4OKFxsHrt" alt="" width="162"><figcaption></figcaption></figure>

Custom website name:

<figure><img src="/files/UB1aPzttPFf5QTshw2ez" alt="" width="375"><figcaption></figcaption></figure>

Select the physical path of the packaged files <mark style="color:red;background-color:red;">(be sure to choose the parent folder of the Build folder, and ensure this folder is not on the C drive)</mark>.

<figure><img src="/files/TGijibxO7P9U4R6LTYuo" alt="" width="375"><figcaption></figcaption></figure>

The port must be an unused one (you can check port usage by running the command `netstat -ano` in the command prompt).

<figure><img src="/files/2FmYhm0mYHEQ9e5afx4l" alt="" width="375"><figcaption></figcaption></figure>

After clicking Confirm, the site will appear on the left side.

<figure><img src="/files/9iZbgow0iFn0Sgi2YmbM" alt="" width="188"><figcaption></figcaption></figure>

## 4. Add MIME Types for the Website

Double-click "MIME Type"

<figure><img src="/files/pyfSPGcVnCSnz6TVzlx2" alt="" width="563"><figcaption></figcaption></figure>

Click "Add" in the top-right corner.

<figure><img src="/files/MMuEGGAql5KFnUGVfr9V" alt=""><figcaption></figcaption></figure>

The following are the relevant MIME types that may be required by the WebClient package. It is recommended to add all of them (the first four are a priority):

{% hint style="info" %} <mark style="background-color:red;">File Extension: .unity3d</mark>\ <mark style="background-color:red;">MIME Types: application/octet-stream</mark>

<mark style="background-color:red;">File Extension: .unity3dgz</mark>\ <mark style="background-color:red;">MIME Types: application/octet-stream</mark>

<mark style="background-color:red;">File Extension: .unityweb</mark>\ <mark style="background-color:red;">MIME Types: application/binary</mark>

<mark style="background-color:red;">File Extension: .br</mark>\ <mark style="background-color:red;">MIME Types: application/javascript</mark>

File Extension: .mem\
MIME Types: application/octet-stream

File Extension: .data\
MIME Types: application/octet-stream

File Extension: .memgz\
MIME Types: application/octet-stream

File Extension: .datagz\
MIME Types: application/octet-stream

File Extension: .jsgz\
MIME Types: application/x-javascript
{% endhint %}

## 5. Add Cross-Origin Access Permissions (Optional Configuration)

<figure><img src="/files/4dqycHhHd6JniiaZYTd5" alt="" width="123"><figcaption></figcaption></figure>

Relevant HTTP Response Headers:

{% hint style="info" %}
Access-Control-Allow-Origin&#x20;

\*

Access-Control-Allow-Methods

GET, POST, PUT, DELETE, OPTIONS

Access-Control-Allow-Headers

Content-Type
{% endhint %}

## 6. Configure Local Computer Settings

After decompression, the structure of the WebClient package is as follows:

<figure><img src="/files/nsrHkJ9gaU7tTjczPf0V" alt="" width="202"><figcaption></figcaption></figure>

* Modify the content of server-config.json to use the local machine's IP address (keep the port as 7789).
* Set the Advanced Firewall properties to "<mark style="color:red;">Off</mark>".
* Set the network connected to this device to <mark style="background-color:$danger;">Public Network</mark> and turn off the firewall (supports cross-device access).

## 7. Check If the Deployment was Successful

In the browser, enter <http://localhost:5050/server-config.json> (assuming the port set above is 5050).

<figure><img src="/files/isTgP47mFEXPDljgIKLo" alt=""><figcaption></figcaption></figure>

If the content of the server-config.json file appears, it proves the deployment is complete.

If the JSON file opens correctly in the browser but the website content fails to load, please check whether "Step 4: MIME Types" was configured correctly. You can also directly verify whether the web.config file generated in the folder contains the fields shown in the following figure (refer to the image).

<figure><img src="/files/5ube3uiTetzvQWROF7Ou" alt=""><figcaption></figcaption></figure>

```
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
                <staticContent>
                        <mimeMap fileExtension=".unity3d" mimeType="application/octet-stream" />
                        <mimeMap fileExtension=".unity3dgz" mimeType="application/octet-stream" />
                        <mimeMap fileExtension=".unityweb" mimeType="application/binary" />
                        <mimeMap fileExtension=".br" mimeType="application/javascript" />
                </staticContent>
        <directoryBrowse enabled="false" />
    </system.webServer>
</configuration>
```

In some computer environments, after adding MIME types, the website may fail to open properly. Please delete the content related to "Step 4: MIME Types" and restart before trying again.

## 8. Why Add These MIME Types?

Because the WebClient build output includes the following file types:

* `.unityweb` (compressed assets, asm, code, etc.)
* `.br` (Brotli compressed)
* `.gz` (Gzip compressed)
* `.mem` (legacy memory files)
* `.data` (resource files)
* `.js` / `.wasm` (scripts and WebAssembly)

When the browser downloads these files, it relies on the **Content-Type** in the HTTP header to determine how to handle them.

If the MIME type is incorrect or missing:

|                  Problem                  |                               Cause                              |
| :---------------------------------------: | :--------------------------------------------------------------: |
|          Unity WebGL blank screen         | wasm/js files are treated as downloads instead of being executed |
|        "Incorrect MIME type" error        |                       Content-Type mismatch                      |
| Brotli/Gzip compressed files fail to load |        Browser does not recognize them as compressed files       |
|      Resource loading fails (404/415)     |                 Server rejects certain file types                |
|     CORS / streaming exceptions occur     |                 Incorrect headers cause blocking                 |

**The purpose of adding these MIME types is to:**

* **Enable the browser to correctly recognize the format of WebClient build files.**
* **Allow compressed files (`.br`/`.gz`) to be automatically decompressed and loaded.**
* **Prevent issues such as resource loading failures, WASM execution errors, blank screens, and related problems.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://udexreal.gitbook.io/udexreal-docs/software-instruction/windows-iis-local-deployment-guide-for-handdriver-webclient.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
