huckfinn19
Programmer
Hi,
I have a COM component written in .Net and hosted in a COM+ server application so that only 1 instance of the component will exist on a box at a given time. Multiple different applications will be accessing the COM component: Matlab, VB Script, .Net application, etc...
When the COM component is instantiated from VB Script or Matlab, I can see the COM+ server starting properly and can verify that only 1 instance of my object is created.
My problem arises when the COM component consumer is a .Net application. Basically, it seems .Net always resolves the location of the DLL and since it is a .Net DLL, always instantiate the object directly, skipping the COM+ mechanism. It seems obvious why .Net behaves that way to get rid of COM overhead, but this is causing problems in my design since I want only 1 instance of my COM Component to exist on a box at one time.
So the question is how can I instantiate a .Net based COM component hosted in a COM+ server application from a .Net application by using the COM+ mechanism?
Thanks
I have a COM component written in .Net and hosted in a COM+ server application so that only 1 instance of the component will exist on a box at a given time. Multiple different applications will be accessing the COM component: Matlab, VB Script, .Net application, etc...
When the COM component is instantiated from VB Script or Matlab, I can see the COM+ server starting properly and can verify that only 1 instance of my object is created.
My problem arises when the COM component consumer is a .Net application. Basically, it seems .Net always resolves the location of the DLL and since it is a .Net DLL, always instantiate the object directly, skipping the COM+ mechanism. It seems obvious why .Net behaves that way to get rid of COM overhead, but this is causing problems in my design since I want only 1 instance of my COM Component to exist on a box at one time.
So the question is how can I instantiate a .Net based COM component hosted in a COM+ server application from a .Net application by using the COM+ mechanism?
Thanks