Advertisement

01.30.2008 at 01:46PM PST, ID: 23124504
[x]
Attachment Details

IIS cgi visual basic .net console app, how to make a hit counter-like app

Asked by MikeBroderick in CGI Scripting, Microsoft IIS Web Server

I am having problems making a simple cgi program work. The page waits for 20 seconds, then only displays Output from CGI:

Environment:
XP (SP3), IIS 5.1

Page T1.shtml:
<html><head><title>Test CGI</title></head>
<body>
        <p>Output from cgi: <!--#exec cgi="/cgi-bin/T1.exe" --> </p>
</body></html>

Here is T1.exe, a compiled VS 2005 console app:
    Sub Main()
        Console.WriteLine("Hello, world!")
    End Sub
(I apologize for dumping source, but this one is easier to list than explain)

I think I am close, if I add a mapping configuration entry to map .exe to aspnet_isapi.dll, I do get output that kinda looks like the binary program.

Can anybody see what I am doing wrong?

Also, please tell me if I am going about this all wrong. The purpose of the cgi is to select and insert images into html and simple asp pages (I only use asp to get the include feature). The program will be a complicated visual basic .net app, but the output will either be dumping the selected file or a links to it.

I used to write cgi code on other platforms. Hit counters (remember those things)  were a common cgi app. You pass the page name as a parm and your program processed it (add a counter in a db rec) and optionally returned a string representation of a number. I also have written many aspx apps. I want to insert an image into pages that are maintained by an html editor.

Thank you.
Start Free Trial
 
 
[+][-]02.13.2008 at 12:44AM PST, ID: 20882588

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2008 at 06:41AM PDT, ID: 21376897

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: CGI Scripting, Microsoft IIS Web Server
Sign Up Now!
Solution Provided By: MikeBroderick
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628