Настройка IIS для выполнения EXE вместо загрузки - PullRequest
0 голосов
/ 14 февраля 2020

Я использую EXE-файлы для внутреннего сайта. У меня есть сервер 2019 и IIS 10. Когда я вызываю EXE-файл, IIS пытается загрузить файл вместо его выполнения.

Я звоню так:

             $.ajax({    
                    url: "cgi-bin/compPack.exe",    
                    dataType: "json",
                    type: "post",       
                    data: dataString,
                    error: ajaxError,           
                    success: function(json){   

Что дает ошибка, потому что он ожидает строку JSON, и если я ввожу

sandbox/cgi-bin/myProgram.exe

в браузере, он просто загружает EXE.

Я добавил модуль CGI, установил разрешения для папки CGI-BIN, попытался добавить и удалить .exe из Mime-типов как application / octet-stream, но не могу заставить его запустить двоичный файл .

Я не уверен, что мне нужно сделать, чтобы он выполнил (любой) файл EXE в папке cgi-bin.

1 Ответ

0 голосов
/ 14 февраля 2020

Исправление было в том, чтобы применить настройки, как продемонстрировано IBM здесь . Их Watson Explorer Engine также использует EXE для своего CGI-интерфейса.

IIS 7.0 and higher on Windows 2008 and later systems:
Open IIS Manager:
For Windows 2008 systems: Select Control Panel > Administrative Tools > Internet Information Services (IIS) Manager.
For Windows 2012 systems: From the desktop, hover your cursor in the upper- or lower- right corner of the screen to show the charms. Click the Start charm, and then click the Internet Information Services (IIS) Manager tile.
In the Connections pane, expand the entry for your computer system, expand Sites, and select the default site, which is the site in which the Watson Explorer Engine virtual directory (vivisimo) is created.
Double-click the Handler Mappings feature.
If the state of CGI-exe is Enabled, no additional configuration is necessary. Proceed to Completing the Installation Process (All Platforms).
If the state of CGI-exe is Disabled, select it and click Edit Feature Permissions from the Actions pane. The Edit Feature Permissions window displays.
Select Execute and click OK to enable applications with the .exe extension to execute in response to CGI requests. If Execute is disabled, select Script > Execute, and then click OK.
...