I was under the impression that I could put any old executable program in the cgi-bin
directory of Apache and have it be used as a CGI script. Specifically, if I have a C# program
static class TestProg
{
static void Main(string[] args)
{
Console.Write("Content-type: text/plain\r\n\r\n");
Console.WriteLine("Arguments:");
foreach (string arg in args)
Console.WriteLine(arg);
}
}
and then go to http://example.com/cgi-bin/TestProg?hello=kitty&goodbye=world
then the query string hello=kitty&goodbye=world
would be passed as the first parameter to main, so my page should look like
Arguments:
hello=kitty&goodbye=world
Unfortunately, none of my query parameters are getting passed; the page loads and just prints Arguments:
with nothing following it.
So how do I get my query parameters passed to this program?