When you deploy and run an application from a network path (either a path on a mapped drive or a UNC path), the .NET Framework on the computer must be configured to have Full Trust permissions at runtime.
To set these permissions, select Administrative Tools>Microsoft .NET Framework 2.0 Configuration from the Windows Control Panel. In the .NET Framework Configuration tool, expand My Computer and select Runtime Security Policy>Machine>Code Groups>All_Code>LocalIntranet_Zone. Select Properties from the pop-up menu and select FullTrust in the Permission set drop-down list on the Permission Set tab page.