How To Deploy WebGL To IIS

Programming, error messages and sample code
When you build a WebGL project in release mode (see Publishing builds), Unity compresses your build output files to reduce the download size of your build. 

Necessary IIS server configuration steps:

By default IIS server does not serve static content of unknown MIME type. In order to make Unity build work on IIS, you first need to associate the .unityweb extension with the application/octet-stream content typ. There are three ways to achieve that:

Using Control Panel: Go to Advance -> Mime Type, create unityweb to application/octet-stream.

Using IIS Manager interface: Select your website in the IIS Manager panel, open the MIME Types feature and select Add… action. Set .unityweb as file name extension and application/octet-stream as MIME type, click OK.

Using server configuration file: IIS uses web.config files for server configuration. Those configuration files reflect all the changes made in IIS Manager for a specific folder. In order to associate application/octet-stream MIME type with .unityweb extension, you can use the following web.config file:

<?xml version="1.0" encoding="UTF-8"?>
            <remove fileExtension=".unityweb" />
<mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />