I have an assembly on the intranet calling to another library on the intranet (in a different folder) which then calls Microsoft HPC API which is installed in the local machine GAC. 

The assembly finds the library using the method in [MS KB 837908](http://support.microsoft.com/kb/837908) and in the process a SecurityException is raised "That assembly does not allow partially trusted callers" (That assembly is the HPC API)

However if I move the library in the same folder on the intranet as the executing assembly (ie. there is no need to call the custom resolver) it all works fine.

How can I improve the custom resolver to avoid this security exception?