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

W

wanaruk

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
properly.

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
stupid.

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.

Thanks
 
W

wanaruk

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
user.

Full description of DEP: http://support.microsoft.com/kb/875352

Thanks for checking.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top