title: Running "partially trusted" .NET assemblies from a network share
body: <p>When I try to run a .NET assembly (<code>boo.exe</code>) from a network share (mapped to a drive), it fails since it's only partially trusted:</p>
  
  <pre><code>Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers.
     at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
     at BooCommandLine..ctor()
     at Program..ctor()
     at ProgramModule.Main(String[] argv)
  The action that failed was:
  LinkDemand
  The assembly or AppDomain that failed was:
  boo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67
  The Zone of the assembly that failed was:
  Intranet
  The Url of the assembly that failed was:
  file:///H:/boo-svn/bin/boo.exe
  </code></pre>
  
  <p>With instructions from <a href="http://www.georgewesolowski.com/blog/PermaLink,guid,4cc5fcdf-cc68-4cf0-a083-b22a8bdc92d6.aspx" rel="nofollow noreferrer">a blog post</a>, I added a policy to the .NET Configuration fully trusting all assemblies with <code>file:///H:/*</code> as their URL. I verified this by entering the URL <code>file:///H:/boo-svn/bin/boo.exe</code> into the <em>Evaluate Assembly</em> tool in the .NET Configuration and noting that boo.exe had the <em>Unrestricted</em> permission (which it didn't have before the policy).</p>
  
  <p>Even with the permission, <code>boo.exe</code> does not run. I still get the same error message.</p>
  
  <p>What can I do to debug this problem? Is there another way to run "partially trusted" assemblies from network shares without having to change something for every assembly I want to run?</p>