NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

SecurityManager.SecurityEnabled

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);

Property Value

True if security is enabled, false if disabled.

Remarks

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.

Example [C#]

[C#]

if ( ! SecurityManager.IsSecurityOn )
    throw new SecurityException ("This application requires security be enabled to run.");

See Also

SecurityManager Class | SecurityManager Members | System.Security Namespace