473,385 Members | 1,356 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,385 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 1046
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.