AppDomain.SetAppDomainPolicy(PolicyLevel) Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Внимание!
AppDomain policy levels are obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
Устанавливает уровень политики безопасности для этого домена приложения.
public:
virtual void SetAppDomainPolicy(System::Security::Policy::PolicyLevel ^ domainPolicy);
public void SetAppDomainPolicy(System.Security.Policy.PolicyLevel domainPolicy);
[System.Obsolete("AppDomain policy levels are obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
[System.Security.SecurityCritical]
public void SetAppDomainPolicy(System.Security.Policy.PolicyLevel domainPolicy);
abstract member SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
override this.SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
[<System.Obsolete("AppDomain policy levels are obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
[<System.Security.SecurityCritical>]
abstract member SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
override this.SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
Public Sub SetAppDomainPolicy (domainPolicy As PolicyLevel)
Параметры
- domainPolicy
- PolicyLevel
Уровень политики безопасности.
Реализации
- Атрибуты
Исключения
domainPolicy равно null.
Уровень политики безопасности уже установлен.
Операция выполняется в выгруженном домене приложения.
Комментарии
Вызовите этот метод перед загрузкой AppDomain сборки в порядок, чтобы политика безопасности вступила в силу.