When I try to run a .NET assembly (boo.exe
) from a network share (mapped to a drive), it fails since it\'s only partially trusted:
Unhandled Exc
I resolved the problem by using caspol as instructed in Johnny Hughes' blog post Running a .Net application from a network share:
caspol -addgroup 1.2 -url file:///H:/* FullTrust
It seems the .NET Configuration GUI for managing the policies simply doesn't work.
Take a look at the 'caspol.exe' program (provided with .NET runtimes). You will have to do this on the machine you are trying to run the application from. I wasn't able to 'mark' and assembly (probably just me). However, using caspol and setting up the proper permission for my app, LocalIntranet_Zone, fix my similar issue.
I have heard (but haven't tried it yet), that .NET 3.5 sp1 removed this tighten security requirement (not allowing .NET assemblies to reside on a share by default).
With .NET 3.5 SP1, .NET assemblies running from UNC shares have full permissions.
See Brad Abrams's Allow .exes to be run off a network shares for workaround and discussions, and finally the follow up .NET 3.5 SP1 allows managed code to be launched from a network share.
I think you want to add the AllowPartiallyTrustedCallers attribute to your assembly. The error message implies that something that's calling into your boo.exe assembly is not fully trusted, and boo.exe doesn't have this attribute allowing it.