Results 1 to 5 of 5

Thread: Executing a perl script from ASPX page?

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Location
    Culver City, CA USA
    Posts
    8

    Question Executing a perl script from ASPX page?

    Hi all...

    I'm writing a page to act as a front-end for a utility script we have on my company's intranet. The script is a perl script, and it basically converts an EDL to different fps formats. The problem is that I want to be able to have the user select an input EDL, supply an output name, and then run the script at the server. These files will be on networked drives accessible by the server, so there shouldn't be any uploading required... just needs to execute "perl scriptName inputFile > outputFile".

    I have downloaded AspExec and installed it on the server, as well as ActivePerl. I can get the script to work manually in the console, but I can't get the webpage to execute it.

    One problem is that all of the documentation for AspExec uses Visual Basic (or VBScript), and I'm not sure what type my variable should be to store an object of AspExec.Execute. I tried the following with no success:

    Code:
    Object fpsScript = new AspExec.Execute();
    However, it said the properties of AspExec did not exist in type Object when I tried to use them.

    Ex. fpsScript.Application = "perl";

    Can anyone suggest any way to do this?? Thanks in advance!

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Location
    Culver City, CA USA
    Posts
    8
    Can't get it to work... I see notepad.exe in the Task Manager on the server, but no window, even with Allow Interaction with Desktop enabled on the IIS Admin Services. That's why I got AspExec, but I'm stuck on how to use it in C#.

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Righty I tried that myself and it doesn't appear for me either.
    But, you don't need it to appear for you - you just need it to run the script in the background surely?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Location
    Culver City, CA USA
    Posts
    8
    yes, but the thing is that it just stalls... even if it has the process running in the background and visible in the Task Manager on the server, it still does not run (ie. no termination). When I run the script on the command line (same exact command), it executes correctly. I don't really know how to fix it because I've never tried doing anything like this before, but it needs to be done. The only other option is just programming it in VB and use AspExec, and call that ASP module from the webpage using Server.Execute, but I'd like to do it in C# if I can, to keep the current project in line with the rest of the code. I also know it can be done, but most of the Google searches I've done have people asking the exact same question, but once they resolve it they never tell how it was resolved!! very frustrating...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width