Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Running a CLI Application via the web

5:28 pm on Feb 9, 2009 (gmt 0)

New User

10+ Year Member

joined:Jan 11, 2006
posts: 13
votes: 0

I have an application that I need to run from my web site. It is a PDF processing tool that is already set up and called from a PHP script.

In IIS, I have tried giving the visitor permissions to run the application by creating a separate application pool, creating a web service extension, etc, but it will not run.

The only way it will run is if I give the anonymous user temporary access to execute CMD.EXE in system32. Obviously I do not want to do this but I can not find a way for it to run otherwise.

I am using IIS 6.0 and know there are security restrictions to this sort of thing. Is there a secure way to give the visitor access to run a CLI based application?

Below is a sample of the PHP script:

$LOCALAPPLICATION_Parms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";

#Execute the LOCALAPPLICATION_ command line and get the return code.
$Return = system($LOCALAPPLICATION_Cmd);

8:02 pm on Feb 9, 2009 (gmt 0)

New User

10+ Year Member

joined:Jan 11, 2006
votes: 0

After reading this KB: [support.microsoft.com...]

and some suggestions in other dev circles, it looks like giving R ACL access to IUSR_LOCAL is normal to run CLI commands. Is this accurate? I will look at other resources but want to be sure.

10:54 am on Feb 10, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 24, 2005
votes: 0

I don't understand why you want to run it as a CGI application when in the past you've given an example with PHP. That makes no sense to me.

If you want to do the same thing as with PHP but on IIS, you need to use ASP.Net. Have a look at the Process class documentation for details on how to do it.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members