C# – Security exception when launching c# app from network location

cexceptionnetnetworkingSecurity

i have a very small utilty app written in c# that works fine on my local machine but if i put it on a network drive and try to run it from there i get the following securityException..

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Anyone know why and how i can fix it?

Thanks!

Best Answer

This is default behaviour for earlier .NET versions. It was 'fixed' in 3.5 SP1. Here is a link.

If you need to use an earlier version, the only solution is to adjust the trustlevel of the assembly (on each PC that uses it). Usually no fun.