WebBrowserPermissionLevel 列舉

定義

警告

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

指定 Web 瀏覽器的使用權限等級。

public enum class WebBrowserPermissionLevel
public enum WebBrowserPermissionLevel
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum WebBrowserPermissionLevel
type WebBrowserPermissionLevel = 
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type WebBrowserPermissionLevel = 
Public Enum WebBrowserPermissionLevel
繼承
WebBrowserPermissionLevel
屬性

欄位

None 0

無法將框架巡覽至 HTML 的 Web 瀏覽器。

Safe 1

可將框架安全巡覽至 HTML,但有數項限制的 Web 瀏覽器。

Unrestricted 2

可無限制地巡覽的 Web 瀏覽器。

範例

下列範例示範如何要求呼叫程式碼具有不受限制的許可權,才能建立網頁瀏覽器控制項。

[WebBrowserPermissionAttribute(SecurityAction.Demand, Level = WebBrowserPermissionLevel.Unrestricted)]
<WebBrowserPermissionAttribute(SecurityAction.Demand, Level:=WebBrowserPermissionLevel.Unrestricted)>
Public Sub Method03()
End Sub

備註

使用此列舉來設定 Level 類別的 WebBrowserPermission 屬性。

保管庫許可權等級會限制下列網頁瀏覽器作業。

  • 無法透過網頁瀏覽器控制項建立快顯視窗。

  • 網頁瀏覽器控制項只能巡覽至其原點網站。

  • 網頁瀏覽器控制項的安全性設定會減少。

適用於