tags:

views:

61

answers:

3

This issue has nothing to do with whether the assemblies have been signed or caspol has been run for the shared network folder. Apparently, the location of the files is the issue, but I cannot find what the real problem is.

I have one executable that references 5 dll's. I can run the app from a local drive without any problem. When I run the app from a network share, I get an error stating that "Could not load file or assembly 'homer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

If all the files are in the same folder, what is the error really telling me?

I should note also that the framework used is 3.5 SP1, which does not require changing code access policy. I had tried that anyhow, and I received the same error in both cases.

Thanks, DaMoose

A: 

Here you go: http://support.microsoft.com/kb/892465

Victor Hurdugaci
Yes, I had signed all of the assemblies and had run caspol to permit the code to be run from a network share. I still had error that the file could not be found.
DaMoose
A: 

You basically need to sign your assemblies. Generate a the private/public keys pair with

sn -k filename.snk

The filename.snk will be specified in the project prperties (right-click the project then select properties).

If you don't obfuscate your code, you can go with this. If you do, you need to "delay sign" the asemblies, i.e. reserve space for the key inside the newly built executable file. Then you need to call

sn -r filename.snk

to resign the executable after obfuscation.

vbocan
Yes, I had signed all of the assemblies and had run caspol to permit the code to be run from a network share. I still had error that the file could not be found.
DaMoose
A: 

How did the assemblies go to that network share? Did you simply copy them or something else? Once I had a problem when I downloaded my own assemblies from my own webserver, and explorer added the "blocked" flag (ntfs stream feature) to the downloaded files, basically generating FileNotFound Exceptions.

iwo
I copied the files from the local drive to the network.
DaMoose
Okay. What does procmon.exe tell you if you add a filter (Path - containst - your exe name). Could be access denied also. Get procmon from here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
iwo