Can I install. NET COM library located on a network shared folder?
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
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.
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.
精彩评论