<PackageReference Include="System.Security.Permissions" Version="9.0.5" />

WebPermission

Controls rights to access HTTP Internet resources.
public IEnumerator AcceptList { get; }

This property returns an enumeration of a single accept permissions held by this WebPermission. The possible objects types contained in the returned enumeration are String and Regex.

public IEnumerator ConnectList { get; }

This property returns an enumeration of a single connect permissions held by this WebPermission. The possible objects types contained in the returned enumeration are String and Regex.

public WebPermission()

Creates a new instance of the WebPermission class.

public WebPermission(NetworkAccess access, string uriString)

Initializes a new instance of the WebPermission class with the specified access rights for the specified URI.

public WebPermission(NetworkAccess access, Regex uriRegex)

Initializes a new instance of the WebPermission class with the specified access rights for the specified URI regular expression.

Creates a new instance of the WebPermission class that passes all demands or fails all demands.

public void AddPermission(NetworkAccess access, string uriString)

Adds the specified URI string with the specified access rights to the current WebPermission.

public void AddPermission(NetworkAccess access, Regex uriRegex)

Adds the specified URI with the specified access rights to the current WebPermission.

public bool IsUnrestricted()

Checks the overall permission state of the WebPermission.