1) リファレンス ( http://forums.asp.net/t/1422162.aspx/1 )から以下を使用してみてください
using System;
namespace ConsoleApplication
{
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
or
<System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert, Unrestricted:=True)> _
class Program
{
static void Main(string[] args)
{
...
}
}
}
2) これで問題が解決しない場合は、web.config ファイルのタグ<trust level="Full" />
内で put を使用してみてください。<system.web>
3)このコマンドを実行caspol.exe -m -ag LocalIntranet_Zone -url \\<network host>\<share name>\ FullTrust -n FullTrustShare
します(もちろん、実行するには管理者としてログインする必要があります)
4) コントロール パネル/管理ツール/Microsoft .NET Framework 構成/セキュリティ設定の構成に移動します。次に、左側の [マイ コンピュータ] -> [ランタイム セキュリティ ポリシー] ノードに移動し、右側の [ゾーン セキュリティの調整] リンクをクリックして、完全な信頼を与えます。