System.Security.Policy.CodeConnectAccess Class

Specifies the network resource access that is granted to code.

See Also: CodeConnectAccess Members


public class CodeConnectAccess


This class is used in conjunction with the System.Security.Policy.NetCodeGroup class to control how executing code can connect back to the site it was downloaded from. These classes provide programmatic control of the System.Net.WebPermission granted to executing code that controls what schemes and ports the code can use access its origin site. You can specify scheme and port pairs that are permitted based on the scheme in the URL where the code originates.

To create a System.Security.Policy.CodeConnectAccess object based on the code's origin scheme, use the CodeConnectAccess.CreateOriginSchemeAccess(int) method.

To create a System.Security.Policy.CodeConnectAccess object that can use any scheme but is restricted by port, use the CodeConnectAccess.CreateAnySchemeAccess(int) method.


Namespace: System.Security.Policy
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions:,
Since: .NET 2.0