calling legacy COM local server from C# Web Service

F

Flora Tang

I have a C++ COM local server that interacts with a vendor
DLL. This COM server is made an EXE since the vendor DLL
dictates that each user connection be from a separate
process. I created a C# Web Service, added a Web
Reference to the COM server and a Web Method to new an
instance of the COM server and execute a method on it. My
problem is that after the Web Method finishes, the COM
server is still running (can be seen in the task
manager). I tried GC.Collect() to force garbage
collection but to no avail. Each Web client calls will
activate a new instance of this local server (which is
really what I want) while existing ones do not go away
even if the client was gone. How do I go about removing
COM local servers that are started by a Web service?

Many thanks!
Flora
 

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

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,184
Latest member
ZNOChrista

Latest Threads

Top