Calling an executable through a COM+ component via an asp page

Discussion in 'ASP General' started by, May 21, 2008.

  1. Guest

    Hi all.
    I am working on a legacy application written in Classic ASP with VB6
    COM+ components running on Windows 2003 Adv Server (32bit). There is
    one page in the app that uses Secure FTP to send a file to another
    application server upon a certain type of data change.

    The way it works:
    Anonymous user posts the form -> ASP code instantiates the COM+
    component which is starting using a Domain User -> Calls a method that
    creates the comma delimited data file and then calls the SFTP method -

    SFTPMethod( )
    1. Writes out a script file that connects to the SFTP server, puts the
    file in the proper location.

    2. Writes a batch file that calls the Tectia SFTP client passing the
    script file name as an argument - then archives the file after the
    script is executed.

    3. Catches the return code from the SFTP client and passes the value
    back to the classic ASP page -> in the event of any values besides
    zero (Success), we display the error code and message on the page.

    The Domain User has permissions to log on as a batch job, and log on
    as a service in the Local Security Policy. I have proven the Domain
    User has proper permissions to everything because I can log in to the
    web server as the Domain User, execute the SFTP client's command line
    command passing the app-generated script, and the whole thing works

    Furthermore, when I leave the remote desktop session open for the
    domain user account and run it from the web page, everything works.
    However, once I log the Domain User out, the transfer fails with the
    error 'Failed to connect to server' returned by the sFTP client.

    So I know that the COM+ method being run as the Domain User can
    generate the data file, generate the script, call the executable, run
    the executable, and return the error. The SFTP client just cannot
    establish a connection off of the server unless the domain user has an
    active windows session on the server. I know I'm missing something

    We have this working on an old Windows 2000 machine with the exception
    that the COM object is being called by a local admin user. But I
    can't find where the configuration is different in neither the COM
    component or the user's permissions. I've tried using a local admin
    account on this Windows 2003 server with the same error.

    Any help would be much appreciated.

    , May 21, 2008
    1. Advertisements

  2. Guest

    Hi all. I have solved my own problem but in case anyone else runs
    into this:

    Running Windows 2003 sp1 with IE7 installled, I had Microsoft's new
    DEP (Data Execution Prevention) running. DEP is an anti-malware
    measure that keeps bad stuff out of your memory and off of your
    network. I had to add my sftp client to the exceptions list. Doing
    so allowed me to access stuff off of the server with an unattended

    Full description of DEP:

    Thanks for checking.
    , May 21, 2008
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soni
  2. Badrinath Mohan

    Calling a COM component via C#(ASP .net)

    Badrinath Mohan, Nov 11, 2003, in forum: ASP .Net
    Badrinath Mohan
    Nov 12, 2003
  3. Jim Hammond
    Jim Hammond
    Nov 12, 2003
  4. Badrinath Mohan

    Calling a COM component via C#(ASP .net)

    Badrinath Mohan, Nov 11, 2003, in forum: ASP .Net Security
    Badrinath Mohan
    Nov 12, 2003
  5. Badrinath Mohan

    Calling a COM component via C#(ASP .net)

    Badrinath Mohan, Nov 11, 2003, in forum: ASP .Net Web Services
    Badrinath Mohan
    Nov 12, 2003

Share This Page