I developed a COM dll class library in .net. Have a simple class defined, extracted Interface for the class and made it public. Decorated the class with classInterfaceType.None. Added 'using System.Runtime.InteropServices;'. Also have [assembly: ComVisible(true)] in the AssemblyInfo.cs, its 'Platform Target' set to 'Any CPU' (which I belive means both x86 and x64). Added new .snk file. Now I build and it builds successfully. Registered in the machine using 'regasm' and it registers successfully.
Now, to test it locally, I open Excel VBA, in Tools->Add Reference' and I see my dll in the list. Added its reference to VBA and I can now call the class's method successfully.
My next requirment is now to make this COM instantiable from a Remote machine. For this, I need to set 'Remote Launch' property of this COM enabled from 'dcomcnfg'(dcomconfig -> Component Services -> Computers-> My Computer -> DCOM Config -> MyCOMDll - right-click-> Properties -> Security -> Launch and Activation permissions -> Customize -> Edit -> Enable Remote Launch/Active for the desired users'.
However, the issue is I am not finding my DLL listed under 'DCOM Config' node in Component Service.
Now If I add 'System.Enterpriceservices' to the class code, build again and use 'regsvcs' from VS Command Prompt to register it, it shows up under COM+ Application in dconcnfg, and with that added as COM+, the part I am not sure if how now set its property so that I can instantiate it on my local machine from a remote machine.., don't see the 'Remote Launch/Activate' options in the property window when its under COM+, (which I unserstand, because its actually now a COM+ app) so thats the issue, will much appreciate if someone can help me to head in right direction
Asked
Active
Viewed 1,485 times
0

tiwarib
- 441
- 6
- 17
-
That doesn't makes sense, DCOM can only apply to out-of-process servers. Which you can't create in .NET, you made an in-process server. – Hans Passant Jun 16 '14 at 22:51
-
this is what I was looking for - http://blogs.microsoft.co.il/sasha/2014/01/07/hosting-a-net-dll-as-an-out-of-process-com-server/. – tiwarib Jun 18 '14 at 17:00