473,725 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Jun 27 '08 #1
1 3570
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.

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1903
by: Johan Lachonius | last post by:
Hi, I'm using a "classic" asp-page and a .net-component which I want to call passing a Recordset as a parameter. I have a reference to ADODB in the .net component which should supply a COM rapper for a Recordset. In the .net component code looks like: using ADODB: public void MyFunction( Recordset rs )
17
14789
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call web-service in a an asynchronous mode (with a callback function)? If so, how?
2
1480
by: Badrinath Mohan | last post by:
Hi All I am accessing a COM component using C#. When i access it through the standalone c# application it works fine.But when i call it using ASP .net application its not working . For example This is my COM function.. Myfunction(int *PNINPUT ,int nsize,int *PNOUTPUT) is the com function in the DLL.
1
1535
by: Peter Rilling | last post by:
I created a COM+ component (ServicedComponent) in .NET. The component has a single method Connect() which returns a reference to a SqlConnection object. This component works fine when the world is centered around .NET. Now I want this component to work when called from inside an ASP page. I know that I can do this because I created a test component with a method that returns a string (strings are simple to marshal). When I called the...
6
1903
by: Marlene Arauz Martin | last post by:
Hello, How's everybody??? I have an aspx. page that is calling an executable,....like this... System.Diagnostics.ProcessStartInfo psi= new System.Diagnostics.ProcessStartInfo(); psi.FileName="RATE2.exe";
1
1642
by: mithu | last post by:
I have a web service(C#) which involves processing lot of information thru a third party component. I have couple of issues with my web service. Issue 1: My web service calls a third party component. The whole operation including getting results to the user takes 16 mins. But even after changing the timeouts to 30 Mins, i was getting time out error just after couple of minutes. It works only after I changed all the time outs to > 30 Mins....
7
2686
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file name based on the name of the VB6 application. A second choice would be a file name based on the # COM interface assembly. I have tried calling Assembly.GetCallingAssembly() but this fails when I use the VB6 client. Is there a way to get this...
1
4050
by: Ashish P K | last post by:
I have a .Net Application(64 bit) calling a 32 bit COM+. What is the best way to achieve this? Basically I have got a webpart dll, which is compiled for any CPU and IIS running on 64 bit. All the webparts works fine but the webpart which are accessing legacy COM+ methods fails to get loaded. To test this further I created a small DotNet Sample App which loads COM+method. If the Sample app is comiled for 32 everything works on 64 bit...
6
11579
by: Ole Nielsby | last post by:
VC has a __cdecl specifier which allows functions and methods to be called with varying parameter count. (I understand this is the default for functions in general but in VC, instances use another convention unless they have an ellipsis argument.) I can force GCC and other compilers to use such a convention by declaring all methods with an ellipsis, but I'd rather not clutter my method definitions with these.
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.