IIdentityPermissionFactory 介面

定義

警告

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

定義建立新識別 (Identity) 使用權限的方法。

public interface class IIdentityPermissionFactory
public interface IIdentityPermissionFactory
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public interface IIdentityPermissionFactory
[System.Runtime.InteropServices.ComVisible(true)]
public interface IIdentityPermissionFactory
type IIdentityPermissionFactory = interface
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type IIdentityPermissionFactory = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type IIdentityPermissionFactory = interface
Public Interface IIdentityPermissionFactory
衍生
屬性

備註

警告

程式碼啟用安全性 (CAS) 在所有版本的 .NET Framework 和 .NET 中已被取代。 最新版本的 .NET 不接受 CAS 批註,並在使用 CAS 相關 API 時產生錯誤。 開發人員應該尋求替代方式來完成安全性工作。

某些類型的辨識項具有對應的身分識別許可權,該許可權會授與該辨識項的元件。 這可讓其他程式碼提出身分識別需求,讓只有具有特定辨識項的程式碼才會通過。 例如,您可以要求來電者具有特定的強式名稱;只有具有該強式名稱的呼叫端才會通過需求。 IIdentityPermissionFactory藉由實作辨識項物件,您可以提供 .NET Framework安全性系統可以呼叫 的實 CreateIdentityPermission 作,以取得代表該辨識項的身分識別許可權。 在原則解析期間,安全性系統會在所有實 IIdentityPermissionFactory 作並授與所產生身分識別許可權給適當元件的辨識項物件上呼叫該方法。

方法

CreateIdentityPermission(Evidence)
已淘汰.

建立指定辨識項的新識別使用權限。

適用於

另請參閱