Question

COM Server registered with reg asm located in a network folder not working properly. When you try to create the object gets the error "Automation error". Everything works correctly if the dll is located on a local disk.

Additional Information:

  • COM library written in. Net 3.5

  • Access to the COM through the VB macro

  • Library has a strong name

Was it helpful?

Solution

Putting COM servers on a network share is asking for trouble. It will randomly fail when the mapped drive letter is no longer mapped or mapped elsewhere. You'll at least want the UNC path to the server (like \\machine\folder\etc), not so sure you'll get this out of Regasm.exe with the /codebase option. Verify the registry key value, HKLM\Software\Classes\CLSID{guid}. Do make sure you used /codebase, this cannot work without it.

Trust could be an issue, use fuslogvw.exe to see what's happening. You'll need caspol.exe to assign trust.

Then there's dependent DLLs, neither Windows nor the CLR will be able to find them. To see what is really going on use SysInternals' ProcMon utility. You'll see COM looking through registry keys and searching for DLLs, watch for failed calls.

OTHER TIPS

It could be that the component requires full trust and you are not running .net 4.0. In older versions, network locations are not granted full trust unless you manually change the permission sets.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top