.NET アプリケーションをネットワーク ドライブから実行すると、まったく同じ実行可能ファイルがローカル ハード ドライブから完全に正常に実行される場合でも失敗しますか?
次のように「完全な信頼」を確認してみました。
try
{
// Demand full trust permissions
PermissionSet fullTrust = new PermissionSet( PermissionState.Unrestricted );
fullTrust.Demand();
// Perform normal application logic
}
catch( SecurityException )
{
// Report that permissions were not full trust
MessageBox.Show( "This application requires full-trust security permissions to execute." );
}
ただし、これは役に立ちません。つまり、アプリケーションが起動し、catch ブロックに入ることはありません。ただし、デバッグ ビルドは、スローされた例外が InheritanceDemand によって引き起こされた SecurityException であることを示しています。何か案は?