IIdentityPermissionFactory 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Code Access Security is not supported or honored by the runtime.
定義建立新身份權限的方法。
public interface class 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
public interface IIdentityPermissionFactory
[System.Runtime.InteropServices.ComVisible(true)]
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}")>]
type IIdentityPermissionFactory = interface
type IIdentityPermissionFactory = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type IIdentityPermissionFactory = interface
Public Interface IIdentityPermissionFactory
- 衍生
- 屬性
備註
注意事項
.NET Framework 和 .NET 的所有版本中,代碼存取安全性(CAS)已被棄用。 最新版本的 .NET 不會接受 CAS 註釋,如果使用 CAS 相關 API,則會產生錯誤。 開發人員應尋求其他方法來完成安全任務。
某些類型的證據會獲得相應的身份許可,並授予擁有該證據的集會。 這使得其他程式碼能夠提出身份要求,因此只有具有特定證據的程式碼才能通過。 例如,你可以要求來電者必須有特定強名;只有擁有強大名稱的來電者才能通過需求。 透過實作證據物件的 IIdentityPermissionFactory,你提供了 CreateIdentityPermission 的實作,.NET Framework 的安全系統可以呼叫它,取得代表該證據的身份權限。 在政策解析過程中,安全系統會對所有實作 IIdentityPermissionFactory 並授予相應組合的身份權限的證據物件呼叫該方法。
方法
| 名稱 | Description |
|---|---|
| CreateIdentityPermission(Evidence) |
已淘汰.
為指定的證據建立新的身份許可。 |