Re: Remote application lunch and terminate (IIS server)

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


Date: Mon, 5 Jul 2004 18:24:12 -0700

If the program you are trying to launch is not a real CGI application, then
do not invoke it as such.

What you want to do is possible, but really has NOTHING to do with IIS. IIS
is just a mechanism whereby you can authenticate to get a user token and
then invoke a command on the server. How you plan to
start/control/terminate this EXE -- that is completely up to you since it
depends on how the EXE is written.

You can create a wrapper script in ASP/batch/Perl/etc, which returns a 200
OK response (or 500 error response if it failed to launch the EXE), and then
it simply invokes the EXE. IIS is involved with only authenticating the
user account that is executing the EXE.

Now, realize that IIS is simply executing commands. How you plan to
control/terminate the EXE you just launched, that's completely up to you --
it has nothing to do with IIS.

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"paolo" <pberna@iol.it> wrote in message
news:d7066c01.0407030416.2741eeab@posting.google.com...
"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:<umuirHKYEHA.1224@TK2MSFTNGP09.phx.gbl>...
> What you observe is completely expected and by-design. It suggests that
the
> application you are trying to run doesn't work as a CGI like that -- you
> must explain exactly what you are trying to do so that people can actually
> help.
>
> When you make a request like:  http://myserver/cgi-bin/application.exe  ,
> the expectation is that application.exe is going to run on the server and
> generate a valid HTTP response on the std output.  If that doesn't happen,
> the request eventually timesout.  This is completely by design because
> that's how CGI-BIN works.
>
> -- 
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "pberna" <xxx@iol.it> wrote in message
> news:ItgFc.32563$c_1.966587@twister1.libero.it...
> Dear all
>
> I installed a IIS server on my windows XP professional machine and I
> would like to start an
>
> application (.exe file) remotely, sending a command like
>
>     http://myserver/cgi-bin/application.exe
>
> I added the virtual directory related to the "application.exe" in the
> Web Server folder using
>
> the IIS administration snap-in. Of course when I try to lannch the
> application, it run but, after a few minutes the server kill the
> application. I think this
> happen because the external user releases the TCP/IP connection and the
> server "delete" all
> resources related to that user.
>
> How can I solve this problem ?
> How is possibe to send a remote command to close the application ?
>
> Thank you
> Best Regards,
> Paolo
Dear David
My scope is to lanch a generic application (.exe) remotly. I know that
a cgi application must respond with http message to the client, but as
a first try I didn't except this behaviour from the server (it kill a
just running application), but now I understand it's obiouvs that this
must happen. In general the application that I would run is not a real
cgi application, I means it doesn't respond on stdout with a vaild
http message.
In any case I would know if, in principle, it is possible to remotely
lunch (but also terminate) a generic .exe file, including it, for
example, in a .BAT file which can also call an addition program that
send a http response to the client after applicaion lunch
Do you know if an how this is possible ?
To avoid application killing from the server, it is enought that the
application respond with a falid http message to the client ?
Thank you
Best Regards
Paolo


Relevant Pages

  • Re: CGI under IIS throws away printf on multiple posts.
    ... IIS is not throwing away anything. ... will have to implement in CGI, by taking a server-side lock to prevent the ... session from performing the operation a second consecutive time. ... "application session" (IIS is a high-performance server. ...
    (microsoft.public.inetserver.iis)
  • re: IIS4 and exe CGI - need help
    ... "CGI Error ... HTTP headers. ... However I did not understand because I went through both server and compared ... IIS application have the "Execute " is selected. ...
    (microsoft.public.inetserver.iis)
  • Re: Web Site Efficiency
    ... How many simultaneous users (approx) can this handle and what happens to the end-user if server freezes from too many users? ... The heart of the system will be the development of a data access COMPONENT (active exe rather than dll to better centrally control user data access. ... Never use DCOM exes to 'centralize' data management from IIS ...
    (microsoft.public.inetserver.asp.components)
  • 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)
  • Re: IIS Lockdown/URLScan - no .exes
    ... INFO: Using URLScan on IIS ... Either I didn't read the Docs very>>well, or didn't configure things correctly, as my server ... >>Specifically, the server would not allow any .asp,>>or .exe files. ...
    (microsoft.public.inetserver.iis.security)