"HTTP Error 404.2 - Not Found" or "HTTP Error 502.2 - Bad Gateway" error

When you run the application and try to download the launcher which is hosted in the IIS Web server, you get the following error:

HTTP Error 404.2 - Not Found
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the web server.


Or

2023-06-05 16:19:55.624 ERROR [7728] Failed to download the installation package http://172.16.100.94:80/CloudAppPublisher/CloudAppInstall 22.0/CloudAppLauncher_Installer.exe; ErrorCode: 404; Error: Not Found.


Or

HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".


Cause:

The "CGI-exe" handler mapping in the IIS server blocks the download of the installation program of the cloud app launcher (CloudAppLauncher_Installer.exe).

The CGI option is not installed in IIS by default, but if you have installed the CGI option and enable the "CGI-exe" handler mapping in IIS, you will need to disable it before you can download the installation program of the cloud app launcher.

Solution:

To disable the "CGI-exe" handler mapping in IIS:

  1. In the IIS Manager, select the web site where the application is hosted.

  2. In Features View, double click Handler Mappings.


  3. Select CGI-exe from the list and then click Edit Feature Permissions….


  4. Uncheck Execute and click OK.

    "CGI-exe" handler will be disabled for the current website.