I'm developing a small demo that assemble class from DLL file.
This is my code:
string path = @"\\192.168.1.3\shareFolder\testzwm.dll";
Assembly ass = Assembly.LoadFrom(path);
It always throws FileLoadException
However if I change to :
string path = @"C:\testzwm.dll";
Assembly ass = Assembly.LoadFrom(path);
It works.
Does it mean I cannot load dll from network path? I think it doesn't make sense. I have read/write authority in \192.168.1.3\shareFolder
If I change the first path to \192.168.1.3\shareFolder\testzwmWRONG.dll, it throws FileNotFoundException
, not the same with FileLoadException.
So I guess it's some security problem
Any help is so appreciated.
------------------EDIT------------------ My project is Windows Form Application.