Create WebPermission that passes all demands or fails all demands.
Imports System.Text.RegularExpressions
Imports System.Net
Imports System.Security.Permissions
Module Example
Public Sub Main()
Dim myWebPermission1 As New WebPermission(PermissionState.None)
myWebPermission1.AddPermission(NetworkAccess.Connect, "http://www.microsoft.com/default.htm")
myWebPermission1.AddPermission(NetworkAccess.Connect, "http://www.msn.com")
myWebPermission1.Demand()
End Sub
End Module
Related examples in the same category