IIS不会运行C CGI程序

IIS wont run C++ CGI program

本文关键字:CGI 程序 运行 IIS      更新时间:2023-10-16

我在IIS上遇到了运行C CGI的重大问题。我本可以发誓我的设置与我的最后一个计算机(Windows 10 32bit NextBook 11 Flex)相同,但是我去打开Windows功能,启用IIS,打开CGI和过滤器,以及过滤器,以及Web包含,启用处理程序并添加了应用程序。但是我似乎无法运行它。这是日志

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2017-02-18 16:00:27
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2017-02-18 16:00:27 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 403 14 0 728
2017-02-18 16:00:27 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 404 0 2 3
2017-02-18 16:00:36 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 404 2 1260 7
2017-02-18 16:01:58 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 47
2017-02-18 16:05:08 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 12
2017-02-18 16:05:08 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 5
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2017-02-18 16:25:25
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2017-02-18 16:25:25 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 14
2017-02-18 16:26:50 ::1 GET /chrisandarpitllc - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 301 0 0 1
2017-02-18 16:26:50 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 200 0 0 2
2017-02-18 16:26:53 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 502 2 3221225781 11
2017-02-18 16:28:14 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://www.chrisandarpitllc.com/ 404 0 2 0
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2017-02-18 16:31:07
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2017-02-18 16:31:07 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 200 0 0 9
2017-02-18 16:31:10 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 502 2 3221225781 29
2017-02-18 16:32:08 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 502 2 3221225781 27
2017-02-18 16:32:08 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 502 2 3221225781 10
2017-02-18 16:32:08 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 502 2 3221225781 5
2017-02-18 16:32:08 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/ 502 2 3221225781 5
2017-02-18 16:32:13 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 13
2017-02-18 16:32:58 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 19
2017-02-18 16:32:58 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 5
2017-02-18 16:32:58 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 5
2017-02-18 16:32:58 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 13
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2017-02-18 16:46:58
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2017-02-18 16:46:58 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 404 2 1260 663
2017-02-18 16:46:58 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 http://localhost/chrisandarpitllc/index.exe 404 0 2 5
2017-02-18 16:50:22 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 404 2 1260 20
2017-02-18 16:52:18 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 90
2017-02-18 16:52:18 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 7
2017-02-18 16:52:18 ::1 GET /chrisandarpitllc/index.exe - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 6
2017-02-18 16:58:14 ::1 GET /chrisandarpitllc/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - 502 2 3221225781 29

这是错误的屏幕截图

IIS错误给出

这是代码(这是一个简单的测试)

#include <iostream>
int main ()
{
    std::cout << "Content-Type:text/htmln" << std::endl;
    std::cout << "Hello world" << std::endl;
    return 0;
}

谁能告诉我为什么这一切会发生?我怎样才能解决这个问题?如果您需要任何信息,请告诉我,我将提供。

我还在另一个设备上检查了网站,这就是我得到的。

移动设备错误

content-type标头可能由" r n r n"符号完成