开发者

Assembly.LoadFrom cannot find file when used in COM

开发者 https://www.devze.com 2023-03-13 16:49 出处:网络
I\'m creating a set of libraries each of which utilise an interface to provide some functionality.Another object is asked at runtime to load one of these assemblies that provide the implementation.Thi

I'm creating a set of libraries each of which utilise an interface to provide some functionality. Another object is asked at runtime to load one of these assemblies that provide the implementation. This object is exposed to COM.

If I reference the loader assembly directly from another .net project, things work as expected and Assembly.LoadFrom works. However when used as a COM object (in my case embedded in a page in IE), it always fails to load the target dll, whether I try to load it from a local folder where the COM object is or from a URL. The error received is:

Co开发者_如何转开发uld not load file or assembly 'file:///C:\Users\jthorpe\Desktop\myassembly.dll' or one of its dependencies. The system cannot find the file specified.

Is this a security issue or something more deep rooted in the way .net gets invoked through COM?


Revisiting and answering this... - I'd missed a section of code further down that was actually trying to load from a different url...!

0

精彩评论

暂无评论...
验证码 换一张
取 消