Recently I came across a problem where my .NET project does not work when my source code is on my mapped drive. In order to give the mapped drive a FullTrust permission, this is what I did:
c:\>caspol -q -machine -addgroup 1 -url file://j:/* FullTrust -name "J Drive"
Have a look at
this article for more detail.