SiteIdentityPermissionAttribute Sınıf

Tanım

Dikkat

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

için güvenlik eylemlerinin SiteIdentityPermission bildirim temelli güvenlik kullanılarak koda uygulanmasına izin verir. Bu sınıf devralınamaz.

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
Devralma
Öznitelikler

Açıklamalar

Önemli

Kısmen güvenilen kod artık desteklenmiyor. Bu özniteliğin .NET Core'da hiçbir etkisi yoktur.

Site kimliği yalnızca HTTP, HTTPS ve FTP protokollerine sahip URL'lerden kod için tanımlanır. Site, URL protokolünden sonra "//" ile varsa aşağıdaki "/" arasındaki dizedir. Örneğin, www.fourthcoffee.com URL'de http://www.fourthcoffee.com/process/grind.htm. Bu, bağlantı noktası numaralarını dışlar. Belirli bir URL ise http://www.fourthcoffee.com:8000/, site www.fourthcoffee.comdeğildir www.fourthcoffee.com:8000.

Siteler tam olarak eşleştirilebilir veya nokta sınırlayıcıda joker karakter ("*") ön eki ile eşleştirilebilir. Örneğin, site adı dizesi *.fourthcoffee.com ile eşleşir fourthcoffee.com www.fourthcoffee.com. Joker karakter olmadan, site adı kesin bir eşleşme olmalıdır. Site adı dizesi * herhangi bir siteyle eşleşir, ancak site kanıtı olmayan kodla eşleşmez.

Önemli

.NET Framework 4'den başlayarak kimlik izinleri kullanılmaz.

.NET Framework sürüm 1.0 ve 1.1'de, çağıran derlemeye tam olarak güvenildiğinde bile kimlik izinlerine yönelik talepler etkili olur. Yani, çağıran derleme tam güvene sahip olsa da, derleme talep edilen ölçütleri karşılamıyorsa kimlik izni talebi başarısız olur. .NET Framework sürüm 2.0'da, çağıran derleme tam güvene sahipse kimlik izinleri talepleri etkisizdir. Bu, tüm izinler için tutarlılık sağlayarak kimlik izinlerinin özel bir durum olarak işlenmesini ortadan kaldırır.

İzin verilen bildirimin kapsamı, kullanılan öğesine SecurityAction bağlıdır.

Bir güvenlik özniteliği tarafından bildirilen güvenlik bilgileri, öznitelik hedefinin meta verilerinde depolanır ve sistem tarafından çalışma zamanında erişilir. Güvenlik öznitelikleri yalnızca bildirim temelli güvenlik için kullanılır. Kesinlik temelli güvenlik için ilgili izin sınıfını kullanın.

Oluşturucular

SiteIdentityPermissionAttribute(SecurityAction)

belirtilen SecurityActionile sınıfının yeni bir örneğini SiteIdentityPermissionAttribute başlatır.

Özellikler

Action

Bir güvenlik eylemi alır veya ayarlar.

(Devralındığı yer: SecurityAttribute)
Site

Çağıran kodun site adını alır veya ayarlar.

TypeId

Türetilmiş bir sınıfta uygulandığında, bu Attributeiçin benzersiz bir tanımlayıcı alır.

(Devralındığı yer: Attribute)
Unrestricted

Özniteliği tarafından korunan kaynağa yönelik tam (sınırsız) iznin bildirilip bildirilmediğini belirten bir değer alır veya ayarlar.

(Devralındığı yer: SecurityAttribute)

Yöntemler

CreatePermission()

öğesinin SiteIdentityPermissionyeni bir örneğini oluşturur ve döndürür.

Equals(Object)

Bu örneğin belirtilen bir nesneye eşit olup olmadığını gösteren bir değeri döndürür.

(Devralındığı yer: Attribute)
GetHashCode()

Bu örneğe ilişkin karma kodu döndürür.

(Devralındığı yer: Attribute)
GetType()

Type Geçerli örneğini alır.

(Devralındığı yer: Object)
IsDefaultAttribute()

Türetilmiş bir sınıfta geçersiz kılındığında, bu örneğin değerinin türetilmiş sınıf için varsayılan değer olup olmadığını gösterir.

(Devralındığı yer: Attribute)
Match(Object)

Türetilmiş bir sınıfta geçersiz kılındığında, bu örneğin belirtilen bir nesneye eşit olup olmadığını gösteren bir değer döndürür.

(Devralındığı yer: Attribute)
MemberwiseClone()

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.

(Devralındığı yer: Object)

Belirtik Arabirim Kullanımları

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

Bir ad kümesini karşılık gelen bir dağıtma tanımlayıcısı kümesine eşler.

(Devralındığı yer: Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Bir arabirimin tür bilgilerini almak için kullanılabilecek bir nesnenin tür bilgilerini alır.

(Devralındığı yer: Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Bir nesnenin sağladığı tür bilgisi arabirimlerinin sayısını alır (0 ya da 1).

(Devralındığı yer: Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Bir nesne tarafından sunulan özelliklere ve yöntemlere erişim sağlar.

(Devralındığı yer: Attribute)

Şunlara uygulanır

Ayrıca bkz.