Tue
3
Jun '08
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.Write(“Content-type: text/html\n\n“);
Console.Write(“Hello World!”);
}
}
}
After the build-ing, you will get an executable file. If you try to execute it from console, you will see some text printed out - inluding a ‘hello world!’.
Now the configuration part
1. Invoke your IIS - Internet Information Services.
2. On the website, click right button -> Properties
3. Home Directory Tab
4. Configuration Button. ‘Applicaiton Window’
5. Click ‘Add’
6. Now you point your new exe file and give your own extension
7. done
8. For testing, create a dummy file with the extension you provided. (content can be anything or empty file)
9. Call it from your browser - like http://localhost/test.cgix
10. You should see ‘Hello World!’
Note: This is not a standard ISAPI extension. Miles to go …

Leave a passing comment »