SiteIdentityPermissionAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
注意事項
Code Access Security is not supported or honored by the runtime.
宣言型セキュリティを使用して SiteIdentityPermission のセキュリティ アクションをコードに適用できるようにします。 このクラスは継承できません。
public ref class SiteIdentityPermissionAttribute sealed : System::Security::Permissions::CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class SiteIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public sealed class SiteIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SiteIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class SiteIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SiteIdentityPermissionAttribute = class
inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
type SiteIdentityPermissionAttribute = class
inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SiteIdentityPermissionAttribute = class
inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type SiteIdentityPermissionAttribute = class
inherit CodeAccessSecurityAttribute
Public NotInheritable Class SiteIdentityPermissionAttribute
Inherits CodeAccessSecurityAttribute
- 継承
- 属性
注釈
Caution
コード アクセス セキュリティ (CAS) は、.NET Framework と .NET のすべてのバージョンで非推奨になりました。 最近のバージョンの .NET では、CAS に関連する API が使用されている場合、CAS 注釈は使用されず、エラーが発生します。 開発者は、セキュリティ タスクを実行するための代替手段を求める必要があります。
サイト ID は、HTTP、HTTPS、FTP のプロトコルを持つ URL からのコードに対してのみ定義されます。 サイトは、URL のプロトコルの後の "//" と、URL www.fourthcoffee.comにhttp://www.fourthcoffee.com/process/grind.htmなど、次の "/" (存在する場合) の間の文字列です。 これにより、ポート番号が除外されます。 特定の URL がhttp://www.fourthcoffee.com:8000/されている場合、サイトはwww.fourthcoffee.comではなくwww.fourthcoffee.com:8000されます。
サイトは、正確に照合することも、ドット区切り記号のワイルドカード ("*") プレフィックスで照合することもできます。 たとえば、サイト名の文字列*.fourthcoffee.comfourthcoffee.comとwww.fourthcoffee.comに一致します。 ワイルドカードを使用しない場合、サイト名は正確に一致する必要があります。 サイト名の文字列 * は任意のサイトと一致しますが、サイトの証拠がないコードと一致しません。
Important
.NET Framework 4 以降では、ID アクセス許可は使用されません。
.NET Framework バージョン 1.0 および 1.1 では、呼び出し元アセンブリが完全に信頼されている場合でも、ID アクセス許可に対する要求が有効になります。 つまり、呼び出し元のアセンブリには完全な信頼がありますが、アセンブリが要求された条件を満たしていない場合、ID アクセス許可の要求は失敗します。 .NET Framework バージョン 2.0 では、呼び出し元アセンブリに完全な信頼がある場合、ID アクセス許可の要求は無効になります。 これにより、すべてのアクセス許可の一貫性が保証され、特別なケースとして ID アクセス許可が処理されるのを排除できます。
許可される宣言のスコープは、使用される SecurityAction によって異なります。
セキュリティ属性によって宣言されたセキュリティ情報は、属性ターゲットのメタデータに格納され、実行時にシステムによってアクセスされます。 セキュリティ属性は、宣言型セキュリティにのみ使用されます。 命令型セキュリティの場合は、対応するアクセス許可クラスを使用します。
コンストラクター
| 名前 | 説明 |
|---|---|
| SiteIdentityPermissionAttribute(SecurityAction) |
古い.
指定したSiteIdentityPermissionAttributeを使用して、SecurityAction クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Action |
古い.
セキュリティ アクションを取得または設定します。 (継承元 SecurityAttribute) |
| Site |
古い.
呼び出し元のコードのサイト名を取得または設定します。 |
| TypeId |
古い.
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
| Unrestricted |
古い.
属性によって保護されているリソースに対する完全な (無制限の) アクセス許可が宣言されているかどうかを示す値を取得または設定します。 (継承元 SecurityAttribute) |
メソッド
| 名前 | 説明 |
|---|---|
| CreatePermission() |
古い.
SiteIdentityPermissionの新しいインスタンスを作成して返します。 |
| Equals(Object) |
古い.
このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| GetHashCode() |
古い.
このインスタンスのハッシュ コードを返します。 (継承元 Attribute) |
| GetType() |
古い.
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsDefaultAttribute() |
古い.
派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。 (継承元 Attribute) |
| Match(Object) |
古い.
派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| MemberwiseClone() |
古い.
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
古い.
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
明示的なインターフェイスの実装
| 名前 | 説明 |
|---|---|
| _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
古い.
一連の名前を対応する一連のディスパッチ識別子に割り当てます。 (継承元 Attribute) |
| _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
古い.
インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。 (継承元 Attribute) |
| _Attribute.GetTypeInfoCount(UInt32) |
古い.
オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。 (継承元 Attribute) |
| _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
古い.
オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。 (継承元 Attribute) |
適用対象
こちらもご覧ください
- SiteIdentityPermission
- Site
- SiteMembershipCondition
- 属性 を使用したメタデータの拡張の