我在IIS上运行C ++ CGI时遇到了重大问题。我可以发誓我将它设置为与我的上一台计算机(Windows 10 32位Nextbook 11 Flex)相同,但是这个(Windows 10 64位HP LP1965)我打开了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
这是错误的屏幕截图
这是代码(这是一个简单的测试)
#include <iostream>
int main ()
{
std::cout << "Content-Type:text/html\n" << std::endl;
std::cout << "Hello world" << std::endl;
return 0;
}
谁能告诉我为什么会发生这一切?我怎样才能解决这个问题?如果您需要任何信息,请告诉我,我会提供。
我还检查了另一台设备上的网站,这是我得到的......
答案 0 :(得分:0)
内容类型标头可能以“ \ r \ n \ r \ n”符号结尾