UrlIdentityPermissionAttribute Класс

Определение

Внимание!

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

Разрешает применять меры безопасности для UrlIdentityPermission к коду с помощью декларативной безопасности. Этот класс не наследуется.

public ref class UrlIdentityPermissionAttribute 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 UrlIdentityPermissionAttribute : 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 UrlIdentityPermissionAttribute : 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 UrlIdentityPermissionAttribute : 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 UrlIdentityPermissionAttribute : 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 UrlIdentityPermissionAttribute = 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 UrlIdentityPermissionAttribute = 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 UrlIdentityPermissionAttribute = 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 UrlIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
Public NotInheritable Class UrlIdentityPermissionAttribute
Inherits CodeAccessSecurityAttribute
Наследование
Атрибуты

Комментарии

Внимание!

Безопасность доступа к коду (CAS) является устаревшей во всех версиях платформа .NET Framework и .NET. В последних версиях .NET заметки CAS не учитываются и при использовании API, связанных с CAS, возникают ошибки. Разработчикам следует искать альтернативные способы выполнения задач безопасности.

Рассматривается полный URL-адрес, включая протокол (HTTP, HTTPS, FTP) и файл. Например, http://www.fourthcoffee.com/process/grind.htm является полным URL-адресом.

Область допустимого объявления зависит от используемого SecurityAction объекта .

Важно!

Начиная с платформа .NET Framework 4, разрешения удостоверений не используются.

Сведения о безопасности, объявленные атрибутом безопасности, хранятся в метаданных целевого атрибута и доступны системе во время выполнения. Атрибуты безопасности используются только для декларативной безопасности. Для обеспечения императивной безопасности используйте соответствующий класс разрешений.

Конструкторы

UrlIdentityPermissionAttribute(SecurityAction)
Устаревшие..

Инициализирует новый экземпляр класса UrlIdentityPermissionAttribute указанным значением SecurityAction.

Свойства

Action
Устаревшие..

Возвращает или задает действие по обеспечению безопасности.

(Унаследовано от SecurityAttribute)
TypeId
Устаревшие..

В случае реализации в производном классе возвращает уникальный идентификатор для этого атрибута Attribute.

(Унаследовано от Attribute)
Unrestricted
Устаревшие..

Возвращает или задает значение, определяющее, объявлено ли полное (неограниченное) разрешение доступа к ресурсу, защищенному атрибутом.

(Унаследовано от SecurityAttribute)
Url
Устаревшие..

Получает или задает полный URL-адрес вызывающего кода.

Методы

CreatePermission()
Устаревшие..

Создает и возвращает новый объект UrlIdentityPermission.

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)

Применяется к

См. также раздел