Unity 5 WebGL setup in IIS


I have the beta downloaded and I am trying to host the WebGL output on IIS 8.5. However, the mem and data files seemed to be blocked. I Believe I have to create a handler mapping for my site but I don’t know which handler to use.

Any ideas?



You need to add MIMETYPE mappings for those file types so IIS knows you intend them to be downloadable by visitors. You can either do this through the IIS user interface or by editing the web.config file to include a block like:

            <mimeMap fileExtension=".mem" mimeType="text/html" />
            <mimeMap fileExtension=".data" mimeType="text/html" />

Thought they had to be octet-streams? Currently everything is also compressed, so

	<mimeMap fileExtension=".memgz" mimeType="application/octet-stream" />
	<mimeMap fileExtension=".datagz" mimeType="application/octet-stream" />
	<mimeMap fileExtension=".unity3dgz" mimeType="application/octet-stream" />
	<mimeMap fileExtension=".jsgz" mimeType="application/x-javascript; charset=UTF-8" />