This property allows applications to test if security is enabled or not. Security configuration provides a way for administrators to disable security if desired.
[Visual Basic] Public Shared Property SecurityEnabled As Boolean [C#] public static bool SecurityEnabled {get; set;} [C++] public: __property static bool get_SecurityEnabled(); public: __property static void set_SecurityEnabled(bool); [JScript] public static function get SecurityEnabled() : Boolean; public static function set SecurityEnabled(Boolean);
True if security is enabled, false if disabled.
When security is disabled all demands will succeed.
Disabling security will make the system vulnerable to attacks by malicious code such as viruses and worms. Turning off security can gain some extra performance and should only be done when other security measures have been taken to ensure overall system security is not breached: for example, disconnecting from public networks, physical security of machines, and so forth.
[C#]
if ( ! SecurityManager.IsSecurityOn ) throw new SecurityException ("This application requires security be enabled to run.");
SecurityManager Class | SecurityManager Members | System.Security Namespace