SecurityManager.SecurityEnabled プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SecurityManager.SecurityEnabled プロパティの意味・解説 

SecurityManager.SecurityEnabled プロパティ

メモ : このプロパティは、互換性のために残されています。

セキュリティが有効かどうかを示す値を取得または設定します

名前空間: System.Security
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ObsoleteAttribute("Because security can no longer be turned
 off permanently, setting the SecurityEnabled property no longer has any effect.
 Reading the property will still indicate whether security has been turned off temporarily.")> _
Public Shared Property SecurityEnabled
 As Boolean
Dim value As Boolean

value = SecurityManager.SecurityEnabled

SecurityManager.SecurityEnabled = value
[ObsoleteAttribute("Because security can no longer be turned off permanently,
 setting the SecurityEnabled property no longer has any effect. Reading the property
 will still indicate whether security has been turned off temporarily.")] 
public static bool SecurityEnabled
 { get; set; }
[ObsoleteAttribute(L"Because security can no longer be turned off permanently,
 setting the SecurityEnabled property no longer has any effect. Reading the property
 will still indicate whether security has been turned off temporarily.")] 
public:
static property bool SecurityEnabled {
    bool get ();
    void set (bool value);
}
/** @property */
public static boolean get_SecurityEnabled ()

/** @property */
public static void set_SecurityEnabled
 (boolean value)
public static function get
 SecurityEnabled () : boolean

public static function set
 SecurityEnabled (value : boolean)

プロパティ
セキュリティ有効な場合trueそれ以外場合false

例外例外
例外種類条件

SecurityException

このメソッド呼び出すコードに SecurityPermissionFlag.ControlPolicy がありません。

解説解説

このプロパティコード アクセス セキュリティ ポリシー ツール (Caspol.exe)-security (-s) オプション使用してコード ベース セキュリティオフにすることができます

SecurityEnabled使用すると、管理者コード アクセス セキュリティ無効にすることができますコード アクセス セキュリティ無効な場合すべてのコード アクセス要求成功します実質的にこのプロパティは、すべてのコードFullTrust与えますコード アクセス セキュリティ無効にすると、セキュリティ システムバイパスされます。そのため、すべてのコードFullTrust与え同等セキュリティ ポリシーよりも、コードパフォーマンス多少向上することがあります。このプロパティ使用しても、ロール ベースセキュリティ無効になることはありません。したがって、PrincipalPermission 要求影響を受けません。

注意に関するメモ注意

コード アクセス セキュリティ無効にすると、システムウイルスワームなどの悪意あるコードによる攻撃を受けやすくなりますコード アクセス セキュリティ無効にしても、マネージ コードの実行自動的にブロックされることは一切ありません。コード アクセス セキュリティ システムによる制限がない状態でマネージ コード実行できるうになるだけです。これを使用するときは、細心の注意払ってくださいセキュリティオフにすると確かにパフォーマンス向上しますが、このセキュリティオフにするのは、別のセキュリティ対策によってシステムセキュリティ確保されている場合だけにしてくださいその他のセキュリティ対策の例として、パブリック ネットワークからの切断や、物理的なコンピュータ保護などがあります

このプロパティ変更は、SavePolicy を呼び出すまでレジストリ永続化されません。新しプロセスは、レジストリ永続化されるまで、変更影響を受けません。実行中のプロセスでこのプロパティの値を変更しても、必ずしも予想どおりに状態は変更されません。変更確実に有効にするには、SavePolicy呼び出して新しプロセス開始する必要があります

使用例使用例

セキュリティ有効になっていることを確認する例を次に示します

If Not SecurityManager.SecurityEnabled Then
    Throw New SecurityException(myResourceManager.GetString("Security_Required"))
End If
if ( !SecurityManager.SecurityEnabled ) {
    throw new SecurityException(myResourceManager.GetString("Security_Required"));
}
if (  !SecurityManager::SecurityEnabled )
{
   throw gcnew SecurityException( myResourceManager->GetString( "Security_Required"
 ) );
}
if (!(System.Security.SecurityManager.get_SecurityEnabled()))
 {
    throw new System.Security.SecurityException(
        myResourceManager.GetString("Security_Required"));
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

SecurityManager.SecurityEnabled プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SecurityManager.SecurityEnabled プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS