ContextUtil.IsSecurityEnabled プロパティ
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文
例外
使用例IsSecurityEnabled プロパティの値を取得するコード例を次に示します。
<SecurityRole("Role1")> _ Public Class ContextUtil_IsSecurityEnabled Inherits ServicedComponent Public Sub Example() ' Display whether role-based security is active for the current COM+ ' context. MsgBox("Role-based security active in current context: " & ContextUtil.IsSecurityEnabled) End Sub 'Example End Class 'ContextUtil_IsSecurityEnabled
[SecurityRole("Role1")]
public class ContextUtil_IsSecurityEnabled
: ServicedComponent
{
public void Example()
{
// Display whether role-based security is active for the current
COM+
// context.
Console.WriteLine("Role-based security active in
current context: {0}",
ContextUtil.IsSecurityEnabled);
}
}
[SecurityRole("Role1")]
public ref class ContextUtil_IsSecurityEnabled:
public ServicedComponent
{
public:
void Example()
{
// Display whether role-based security is active for the current
COM+
// context.
Console::WriteLine( "Role-based security active in
current context: {0}",
ContextUtil::IsSecurityEnabled );
}
};
/** @attribute SecurityRole("Role1") */ public class ContextUtil_IsSecurityEnabled extends ServicedComponent { public void Example() { // Display whether role-based security is active for the current COM+ // context. Console.WriteLine("Role-based security active in current context: {0}", System.Convert.ToString(ContextUtil.get_IsSecurityEnabled())); } //Example } //ContextUtil_IsSecurityEnabled
.NET Framework のセキュリティ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照- ContextUtil.IsSecurityEnabled プロパティのページへのリンク