WebBrowserPermissionLevel WebBrowserPermissionLevel WebBrowserPermissionLevel WebBrowserPermissionLevel Enum

定义

指定 Web 浏览器的权限级别。Specifies the permission level for a Web browser.

public enum class WebBrowserPermissionLevel
public enum WebBrowserPermissionLevel
type WebBrowserPermissionLevel = 
Public Enum WebBrowserPermissionLevel
继承
WebBrowserPermissionLevelWebBrowserPermissionLevelWebBrowserPermissionLevelWebBrowserPermissionLevel

字段

None None None None 0

无法将框架定位到 HTML 的 Web 浏览器。A Web browser that cannot navigate frames to HTML.

Safe Safe Safe Safe 1

可以安全地将框架定位到 HTML(但需要满足若干个限制)的 Web 浏览器。A Web browser that can safely navigate frames to HTML but with several restrictions.

Unrestricted Unrestricted Unrestricted Unrestricted 2

可以不受限制地进行定位的 Web 浏览器。A Web browser that can navigate without restrictions.

示例

下面的示例演示如何要求调用代码具有创建 Web 浏览器控件的无限制权限。The following example shows how to demand that the calling code has unrestricted permission to create a Web browser control.

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

注解

使用此枚举设置Level WebBrowserPermission类的属性。Use this enumeration to set the Level property of the WebBrowserPermission class.

安全权限级别限制以下 Web 浏览器操作。The Safe permission level restricts the following Web browser operations.

  • 无法通过 Web 浏览器控件创建弹出窗口。A pop-up window cannot be created over the Web browser control.

  • Web 浏览器控件只能定位到其源站点。The Web browser control can only be navigated to its site of origin.

  • 减少了 Web 浏览器控件的安全设置。The security settings of the Web browser control are reduced.

适用于