Re: Unable to execute CGI app

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 10/12/04


Date: Mon, 11 Oct 2004 19:57:41 -0700

My instructions are sufficient to execute a CGI on IIS6. If you get the 405
error message AND your CGI EXE executes on the POST, then it does not seem
to be an IIS issue.

As soon as IIS routed the POST request to the CGI and executed it, IIS is
out of the picture. The response that is returned is either from the CGI
itself or an ISAPI Filter/Extension intercepting the request. In all those
cases, IIS is not responsible for the response -- so you will have to
identify what is misbehaving. For example, maybe you have an Security ISAPI
Filter that returns 405 for all POST requests.

I would start by getting rid of all custom ISAPI Filter/Extension on the
server and then trying the configuration again -- get to a simple, working
state first for the CGI, and then add on everything else.

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"D. Hernandez" <dhernandez@teleline.es> wrote in message
news:cfbe97cd.0410101048.7f5cbfa8@posting.google.com...
Hi,
I have a very simple CGI .EXE application written in Delphi that
retrieves POSTed data and inserts it into a SQL Server table. When I
deploy it to a Win2003 Server (IIS 6.0) I receive 405 error - method
not allowed (invalid HTTP verb). If I use GET instead of POST
everything works fine. The most curious thing is that when I use POST
the app executes too (the record gets inserted into the database), but
the browser displays the 405 error message.
I've followed Microsoft David Wang's suggestions I've read in this
forum, but anyway the 405 continues to appear:
**********************************************************
Since CGI EXE and ISAPI DLL are intrinsically executable by IIS, they
do not
need Application Configuration.  Application configuration is only
used for
scripts (i.e. ASP pages are not executable -- it is script code that
needs
to be compiled/interpreted by something else to generate a response).
All you need to configure:
1. /cgi-bin  needs to have "Scripts and Executables" permission --
this
tells IIS to allow .EXE to be accessed as an executable instead of a
static
file
2. Full-Path-To-cgimail.exe needs to be added to Web Service Extension
and
enabled -- this allows IIS to allow that .EXE to actually execute in
memory.
No need to configure anything else to execute a CGI on the server.
**********************************************************
Anybody could please give me further ideas...
Best regards,
David Hernandez


Relevant Pages

  • Re: IIS6 - CGI wont run on new website
    ... > Sounds like your CGI is broken and needs to be debugged. ... > Your customer did not correctly configure execute permissions for the ... > instead of execute on server. ... > This configuration controls how IIS handles such ambiguous URLs. ...
    (microsoft.public.inetserver.iis)
  • Re: Remote application lunch and terminate (IIS server)
    ... If the program you are trying to launch is not a real CGI application, ... What you want to do is possible, but really has NOTHING to do with IIS. ... then invoke a command on the server. ... depends on how the EXE is written. ...
    (microsoft.public.inetserver.iis)
  • Help with CGI interpreter
    ... I want to go with IIS. ... extension in IIS virtual folder's properties, and assign my EXE to it. ... I have decided to write a CGI interpreter lol ... I mean if a web form uses POST method rather than GET. ...
    (microsoft.public.dotnet.languages.csharp)
  • Unable to execute CGI app
    ... retrieves POSTed data and inserts it into a SQL Server table. ... Since CGI EXE and ISAPI DLL are intrinsically executable by IIS, ... No need to configure anything else to execute a CGI on the server. ...
    (microsoft.public.inetserver.iis)
  • Re: IIS 6.0 CGI pipe broken...
    ... Ok, great, so your CGI is obeying all the rules and is actually executed by ... Does this CGI "shell out" to call CMD.EXE in any way, like execute a batch ... The logon made by RUNAS is has a different set of switches than the logon ... that IIS makes. ...
    (microsoft.public.inetserver.iis.security)