SiteIdentityPermissionAttribute Třída

Definice

Upozornění

Code Access Security is not supported or honored by the runtime.

Umožňuje použití akcí SiteIdentityPermission zabezpečení pro kód pomocí deklarativního zabezpečení. Tuto třídu nelze dědit.

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)]
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}")]
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)>]
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.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
Public NotInheritable Class SiteIdentityPermissionAttribute
Inherits CodeAccessSecurityAttribute
Dědičnost
Atributy

Poznámky

Důležité

Částečně důvěryhodný kód se už nepodporuje. Tento atribut nemá žádný vliv na .NET Core.

Identita webu je definována pouze pro kód z adres URL s protokoly HTTP, HTTPS a FTP. Web je řetězec mezi "//" za protokolem adresy URL a následující "/", pokud je například v www.fourthcoffee.com adrese URL http://www.fourthcoffee.com/process/grind.htm. Tím se vyloučí čísla portů. Pokud je http://www.fourthcoffee.com:8000/daná adresa URL , web není www.fourthcoffee.com``www.fourthcoffee.com:8000.

Weby se dají přesně shodovat nebo zástupným znakem ("*") předponou v oddělovači tečky. Například řetězec *.fourthcoffee.com názvu webu odpovídá fourthcoffee.com i www.fourthcoffee.com. Bez zástupné dokumentace musí být název webu přesnou shodou. Řetězec * názvu webu bude odpovídat libovolnému webu, ale nebude odpovídat kódu, který neobsahuje žádné důkazy o webu.

Důležité

Počínaje .NET Framework 4 se oprávnění identit nepoužívají.

V .NET Framework verze 1.0 a 1.1 jsou požadavky na oprávnění identity efektivní i v případě, že je volající sestavení plně důvěryhodné. To znamená, že i když volající sestavení má úplný vztah důvěryhodnosti, požadavek na oprávnění k identitě selže, pokud sestavení nesplňuje požadavkům kritéria. V .NET Framework verze 2.0 jsou požadavky na oprávnění identity neefektivní, pokud má volající sestavení úplný vztah důvěryhodnosti. To zajišťuje konzistenci pro všechna oprávnění a eliminuje zacházení s oprávněními identit jako zvláštní případ.

Rozsah povolené deklarace závisí na SecurityAction použitém souboru.

Informace o zabezpečení deklarované atributem zabezpečení jsou uloženy v metadatech cíle atributu a jsou přístupné systémem za běhu. Atributy zabezpečení se používají pouze pro deklarativní zabezpečení. Pro imperativní zabezpečení použijte odpovídající třídu oprávnění.

Konstruktory

SiteIdentityPermissionAttribute(SecurityAction)

Inicializuje novou instanci SiteIdentityPermissionAttribute třídy se zadaným SecurityAction.

Vlastnosti

Action

Získá nebo nastaví akci zabezpečení.

(Zděděno od SecurityAttribute)
Site

Získá nebo nastaví název webu volajícího kódu.

TypeId

Při implementaci v odvozené třídě získá jedinečný identifikátor pro tento Attribute.

(Zděděno od Attribute)
Unrestricted

Získá nebo nastaví hodnotu určující, zda je deklarováno úplné (neomezené) oprávnění k prostředku chráněnému atributem.

(Zděděno od SecurityAttribute)

Metody

CreatePermission()

Vytvoří a vrátí novou instanci .SiteIdentityPermission

Equals(Object)

Vrací hodnotu, která určuje, zda je tato instance rovna zadanému objektu.

(Zděděno od Attribute)
GetHashCode()

Vrátí hodnotu hash pro tuto instanci.

(Zděděno od Attribute)
GetType()

Type Získá aktuální instanci.

(Zděděno od Object)
IsDefaultAttribute()

Při přepsání v odvozené třídě určuje, zda hodnota této instance je výchozí hodnotou odvozené třídy.

(Zděděno od Attribute)
Match(Object)

Při přepsání v odvozené třídě vrátí hodnotu, která označuje, zda se tato instance rovná zadanému objektu.

(Zděděno od Attribute)
MemberwiseClone()

Vytvoří použádnou kopii aktuálního souboru Object.

(Zděděno od Object)
ToString()

Vrátí řetězec, který představuje aktuální objekt.

(Zděděno od Object)

Explicitní implementace rozhraní

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Mapuje sadu názvů na odpovídající sadu identifikátorů pro rozesílání.

(Zděděno od Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Načte informace o typu objektu, který lze použít k získání informací o typu rozhraní.

(Zděděno od Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Získá počet rozhraní typu informací, které objekt poskytuje (0 nebo 1).

(Zděděno od Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Poskytuje přístup k vlastnostem a metodám vystaveným objektem.

(Zděděno od Attribute)

Platí pro

Viz také