Connecting Tech Pros Worldwide Forums | Help | Site Map

ASP.NET & cgi

Mark Rae
Guest
 
Posts: n/a
#1: Nov 18 '05
Hi,

I'm not sure if this is the right newsgroup, but here goes...

I'm trying to integrate the webwho.zip cgi script from the following site:
http://www.webwho.co.uk/ into a standard ASP.NET site, but know nothing at
all about cgi.

Basically, I just want people to type the domain they want to look up into a
textbox, and then click a button to submit the form.

The site says that the script works "straight out of the box" but is also
massively configurable. I'd be happy just to get it working in my site! Can
anyone help?

Best,

Mark Rae


bruce barker
Guest
 
Posts: n/a
#2: Nov 18 '05

re: ASP.NET & cgi


its a simple perl script, so it will work on any server which supports perl
scripts. to get to work with asp.net, you will need to install a perl
interpreter.


-- bruce (sqlwork.com)






"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:ugboWjflEHA.2884@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi,
>
> I'm not sure if this is the right newsgroup, but here goes...
>
> I'm trying to integrate the webwho.zip cgi script from the following site:
> http://www.webwho.co.uk/ into a standard ASP.NET site, but know nothing at
> all about cgi.
>
> Basically, I just want people to type the domain they want to look up into[/color]
a[color=blue]
> textbox, and then click a button to submit the form.
>
> The site says that the script works "straight out of the box" but is also
> massively configurable. I'd be happy just to get it working in my site![/color]
Can[color=blue]
> anyone help?
>
> Best,
>
> Mark Rae
>
>[/color]


Mark Rae
Guest
 
Posts: n/a
#3: Nov 18 '05

re: ASP.NET & cgi


"bruce barker" <nospam_brubar@safeco.com> wrote in message
news:unLze7flEHA.3988@tk2msftngp13.phx.gbl...

Bruce,
[color=blue]
> its a simple perl script, so it will work on any server which supports
> perl
> scripts. to get to work with asp.net, you will need to install a perl
> interpreter.[/color]

Thanks for the reply - according to my hosting company (www.hostinguk.net),
they have CGI and Perl 5 support, specifically "Perl for Win32 is
ActiveState's port of most of the functionality found in Perl, with the
addition of extra Win32 API specific calls that allow you to take advantage
of Windows specific functionality."

Will that be sufficient?

Also, does IIS 5.1 (WinXP Pro) have the same support for CGI / Perl?

Thanks,

Mark


Lau Lei Cheong
Guest
 
Posts: n/a
#4: Nov 18 '05

re: ASP.NET & cgi


That'll depend on what function does your CGI script use.

ActivePerl is not a full clone of Perl on *nix systems. Some of it's
function will not work correctly(e.g.: file locks) and some doesn't even
ported. You'll have to go to ActiveState's website to check it first.

Once confirmed it's OK, on IIS 5 it's simple. Just set the ASP.NET directory
to enable perl.exe to process .cgi extension files(This should be set when
creating new ADs, but don't know whether it's affect existing ADs.) Then set
the form's "action" property to point to the cgi. In IIS 6 of Win2003,
you'll have to enable Perl first.(Default state of Perl on IIS6 is
prohibited)

"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> 在郵件
news:uaquuAglEHA.1008@tk2msftngp13.phx.gbl 中撰寫...[color=blue]
> "bruce barker" <nospam_brubar@safeco.com> wrote in message
> news:unLze7flEHA.3988@tk2msftngp13.phx.gbl...
>
> Bruce,
>[color=green]
> > its a simple perl script, so it will work on any server which supports
> > perl
> > scripts. to get to work with asp.net, you will need to install a perl
> > interpreter.[/color]
>
> Thanks for the reply - according to my hosting company[/color]
(www.hostinguk.net),[color=blue]
> they have CGI and Perl 5 support, specifically "Perl for Win32 is
> ActiveState's port of most of the functionality found in Perl, with the
> addition of extra Win32 API specific calls that allow you to take[/color]
advantage[color=blue]
> of Windows specific functionality."
>
> Will that be sufficient?
>
> Also, does IIS 5.1 (WinXP Pro) have the same support for CGI / Perl?
>
> Thanks,
>
> Mark
>
>[/color]


Mark Rae
Guest
 
Posts: n/a
#5: Nov 18 '05

re: ASP.NET & cgi


"Lau Lei Cheong" <leu_lc@yehoo.com.hk> wrote in message
news:%23Sfg0OhlEHA.3356@TK2MSFTNGP14.phx.gbl...
[color=blue]
> That'll depend on what function does your CGI script use.
>
> ActivePerl is not a full clone of Perl on *nix systems. Some of it's
> function will not work correctly(e.g.: file locks) and some doesn't even
> ported. You'll have to go to ActiveState's website to check it first.[/color]

I've been told that it will run OK in ActivePerl.
[color=blue]
> Once confirmed it's OK, on IIS 5 it's simple. Just set the ASP.NET
> directory
> to enable perl.exe to process .cgi extension files[/color]

How do I do that?
[color=blue]
>(This should be set when creating new ADs, but don't know whether it's
>affect existing ADs.)[/color]

New ADs? New Active Directories...???
[color=blue]
>Then set the form's "action" property to point to the cgi.[/color]

That's done.
[color=blue]
> In IIS 6 of Win2003, you'll have to enable Perl first.(Default state of
> Perl on IIS6 is
> prohibited)[/color]

That's fine - my hosting company will do that.


Lau Lei Cheong
Guest
 
Posts: n/a
#6: Nov 18 '05

re: ASP.NET & cgi



"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> 在郵件
news:utVEVVklEHA.536@TK2MSFTNGP11.phx.gbl 中撰寫...[color=blue]
> "Lau Lei Cheong" <leu_lc@yehoo.com.hk> wrote in message
> news:%23Sfg0OhlEHA.3356@TK2MSFTNGP14.phx.gbl...
>[color=green]
> > That'll depend on what function does your CGI script use.
> >
> > ActivePerl is not a full clone of Perl on *nix systems. Some of it's
> > function will not work correctly(e.g.: file locks) and some doesn't even
> > ported. You'll have to go to ActiveState's website to check it first.[/color]
> I've been told that it will run OK in ActivePerl.[/color]
That's good. :)
[color=blue][color=green]
> > Once confirmed it's OK, on IIS 5 it's simple. Just set the ASP.NET
> > directory
> > to enable perl.exe to process .cgi extension files. At the application[/color][/color]
settings,[color=blue]
> How do I do that?[/color]
In your IIS management console, right click your website and select
"properties",
then click configure. See if ".cgi" extension exist. If not, create one with
exec path
set to:

C:\Perl\bin\perl.exe "%s" %s

You should actually see that ".pl" have been set automatically. But it won't
touch
the cgi extension as ".cgi" is not necessarily a Perl script.

Not that you have to explicitly declare ActivePerl responsible for handling
".cgi"
in the VD in other to make it work as IIS won't check the
"#C:\Perl\Perl.exe" header
as said by some Perl programming books.
[color=blue][color=green]
> >(This should be set when creating new ADs, but don't know whether it's
> >affect existing ADs.)[/color]
> New ADs? New Active Directories...???[/color]
Emmm... Sorry, I mean VD actually...
[color=blue][color=green]
> >Then set the form's "action" property to point to the cgi.[/color]
>
> That's done.
>[color=green]
> > In IIS 6 of Win2003, you'll have to enable Perl first.(Default state of
> > Perl on IIS6 is
> > prohibited)[/color]
>
> That's fine - my hosting company will do that.
>
>[/color]


Mark Rae
Guest
 
Posts: n/a
#7: Nov 18 '05

re: ASP.NET & cgi


"Lau Lei Cheong" <leu_lc@yehoo.com.hk> wrote in message
news:eQgtanklEHA.3896@TK2MSFTNGP15.phx.gbl...
[color=blue][color=green]
>> How do I do that?[/color]
> In your IIS management console, right click your website and select
> "properties",
> then click configure. See if ".cgi" extension exist. If not, create one
> with exec path
> set to:
>
> C:\Perl\bin\perl.exe "%s" %s
>
> You should actually see that ".pl" have been set automatically. But it
> won't touch
> the cgi extension as ".cgi" is not necessarily a Perl script.
>
> Not that you have to explicitly declare ActivePerl responsible for
> handling ".cgi"
> in the VD in other to make it work as IIS won't check the
> "#C:\Perl\Perl.exe" header
> as said by some Perl programming books.[/color]

Excellent! It's working now. I'll need to read up on the Perl syntax so that
I can modify the script so that the output looks and feels like the rest of
the site, but at least it's working. Thanks for your help with that.
[color=blue][color=green][color=darkred]
>> >(This should be set when creating new ADs, but don't know whether it's
>> >affect existing ADs.)[/color]
>> New ADs? New Active Directories...???[/color]
> Emmm... Sorry, I mean VD actually...[/color]

I've modified the Default website too, so hopefully any new virtual
directories should "inherit" the configuration.


Closed Thread