Running exes on a FrontPage server?

G

Guest

I have a www site hosted by a web hotel. The web hotel is running a Windows
FontPage server (I believe).

I am also running an Apache Windows server at home.

On my Apache server I have an simple test.exe which just displays "Hello World"
(the source code is listed at the bottom of this message).

When I open the page http://localhost/cgi-bin/test.exe (or via www) when Apache
is serving I get a page with "Hello World" as expected.

But when I open the page http://www.mypage/test.exe when FrontPage is serving I
get a page with download instruction on the test.exe.
Or when I open a simple htm file at http://www.mypage/testing.htm I get nothing
but an empty page. The source for testing.htm is below.

What am I doing wrong?


html>
<head>
<title>Testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
<!--#exec cgi="test.exe" -->
</body>
</html>


__stdcall int WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR
lpCmdLine,int nCmdShow)
{
cout << "Content-Type: text/html\n\n"; // output HTTP header

// output XML declaration and DOCTYPE
cout << "<?xml version = \"1.0\"?>"
<< "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" "
<< "\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">";

// output html element and some of its contents
cout << "<html xmlns = \"http://www.w3.org/1999/xhtml\">"
<< "<head><title>Just testing</title></head>"
<< "<body><p>" << "Hello World"
<< "</p></body></html>";

return 0;
} // end main
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top