COM+ Invocation error code on remote machine

1

I have a new requirement to change the way we reference a COM+ object. Before it was fine to add it through the Add References and find the COM object from the list though the TypeLib name.

This has now been changed and I am trying to figure out how can I create an instance using the Activator.CreateInstance.

So far, I have the following:

var type = Type.GetTypeFromProgID("DllName.COMName", "serverName", false);
var comObject = Activator.CreateInstance(type);

When invoking the method

comObject.GetType().InvokeMember("MyMethod",   BindingFlags.Public |  BindingFlags.InvokeMethod, null, COMObject, new object[1] { "12345" });

I get an UNKNOWN NAME (0x80020006) during the invocation when the code is executed on the remote machine, ...however on the development machine, the call passes without any problem. On the remote machine it logs the exception! It drives me crazy.

I found this https://support.microsoft.com/en-us/kb/822335, but I dont think it is relevant to me.

Both COM+ interface names are identical in both machines and I have ran out of options. Has anyone faced the same issue with 2 different machines? Thanks in advance..

c#
com-interop
com+
typelib
asked on Stack Overflow Oct 16, 2015 by (unknown user)

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0