473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Web service calling COM server

I have some code in a regular client-based app that calls a COM component
hosted in an EXE. For the code to work, the EXE must be running. This works
fine.

When I place the same code in a Web service (using IIS on my local computer)
and I invoke the COM component, it starts up another instance of the EXE
rather than use the already running EXE like it does in my client-based app.
What I need it to do is use the existing running instance of the EXE like in
the client-based app.

Note - using GetObject instead of CreatObject had not effect on the
component instantiation.

Any help or guidance would be appreciated.
Nov 23 '05 #1
2 1047
Well I am assuming CreateObject is kicking off a new COM object and
creating a new executable, as I would expect it to. So you want to use
the same EXE, one way to handle this might be to store the COM object
into applcation state. This way you can call the object whenever you
like. Are you using Component Services (COM+) as well?

One side note, I would be cautious about is using a single instance of
an EXE is the thread safety. What would happen if two calls are made
at the same time, can the COM object properly handle it?
Just my 2 cents, Hope this helps

Nov 23 '05 #2
Well I am assuming CreateObject is kicking off a new COM object and
creating a new executable, as I would expect it to. So you want to use
the same EXE, one way to handle this might be to store the COM object
into applcation state. This way you can call the object whenever you
like. Are you using Component Services (COM+) as well?

One side note, I would be cautious about is using a single instance of
an EXE is the thread safety. What would happen if two calls are made
at the same time, can the COM object properly handle it?
Just my 2 cents, Hope this helps

Nov 23 '05 #3

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

Similar topics

23
by: Adam Clauss | last post by:
I have a C# Windows Service running as the NetworkService account because it needs to access a network share. As part of the service's initialization, I want the service to terminate, if an...
3
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb)....
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
41
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.