Networking
System
[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]
1.0.x.x
1.0.5000.0
2.0.0.0
4.0.0.0
All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.
System.Security.CodeAccessPermission
System.Security.Permissions.IUnrestrictedPermission
System.MonoTODO("Most private members that include functionallity are not implemented!")
provides a set of methods and properties to control access to Internet resources. You can use a to provide either restricted or unrestricted access to your resource, based on the that is set when the is created.
Create a instance by calling its constructor using one of the following sets of parameters:
-
No parameters. The default is .
-
A . Specify either to allow any URI to be used in the target class, or to allow access only to URIs that you specify through the use of the method.
-
A value and a URI string. The specified URI has permissions granted by the value.
-
A specifier and URI regular expression.
The and hold the URIs to which you have granted access permission. To add a URI to either of these lists, use . If you pass as the parameter, the URI will be added to the . will allow connections to your target class with URIs matching the .
To deny access to an Internet resource, you must deny access to all the possible paths to that resource. This requires calling with state parameter set to . A better approach is to allow access to the specific resource only. For more information about this subject, refer to the [<topic://cpcondeny>] topic.
You need to deny access using only the resource canonical path. There is no need to use all the path's syntactical variations.
User name and default port information is stripped from the before the comparison with the regular expression argument that is supplied to the constructor. If the regular expression contains user information or the default port number, then all incoming s will fail to match the regular expression.
Controls rights to access HTTP Internet resources.
Constructor
1.0.5000.0
2.0.0.0
4.0.0.0
Creates a new instance of the class. This constructor creates an empty permission that does not grant any rights.
Creates a new instance of the class.
Constructor
1.0.5000.0
2.0.0.0
4.0.0.0
The value of the parameter is either or , respectively yielding fully restricted or fully unrestricted access to all security variables. If you specify , then you can give access to individual URIs using .
Creates a new instance of the class that passes all demands or fails all demands.
A value.
0
Constructor
1.0.5000.0
2.0.0.0
4.0.0.0
is .
This constructor initializes a and grants its target permission to either make a remote host connection or accept a remote host connection using the URI described by the parameter.
Initializes a new instance of the class with the specified access rights for the specified URI.
A NetworkAccess value that indicates what kind of access to grant to the specified URI. indicates that the application is allowed to accept connections from the Internet on a local resource. indicates that the application is allowed to connect to specific Internet resources.
A URI string to which access rights are granted.
0
Constructor
1.0.5000.0
2.0.0.0
4.0.0.0
This constructor initializes a and grants its target permission to either make a remote host connection or accept a remote host connection using the URI described by the parameter.
It is recommended that you create using the , , and flags.
A candidate URI string is checked against the list of relevant regular expressions ( or ) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a and checked against the appropriate list.
Initializes a new instance of the class with the specified access rights for the specified URI regular expression.
A value that indicates what kind of access to grant to the specified URI. indicates that the application is allowed to accept connections from the Internet on a local resource. indicates that the application is allowed to connect to specific Internet resources.
A regular expression that describes the URI to which access is to be granted.
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Collections.IEnumerator
To be added.
This property gets a list of local resources permitted by this . The class to which you have applied only has permission to receive an incoming connection to local resources found in this list.
You can add URIs to this list using .
A candidate URI string is checked against the list of relevant regular expressions ( or ) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a and checked against the appropriate list.
This property returns an enumeration of a single accept permissions held by this . The possible objects types contained in the returned enumeration are and .
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Void
If you have specified as the , use to permit the use of in the target class. The way that can be used by the target class is specified by . Specify as the access parameter to add the URI specified by the parameter to the list of URI accept strings, or specify as the access parameter to add the URI to the list of URI connect strings.
Calling on will have no effect, because permission is granted to all URIs.
A candidate URI string is checked against the list of relevant regular expressions ( or ) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a and checked against the appropriate list.
Adds the specified URI string with the specified access rights to the current .
A that specifies the access rights that are granted to the URI.
A string that describes the URI to which access rights are granted.
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Void
If you have specified as the , use to allow the use of in the target class. Specify as the parameter to add the URI specified by the parameter to the list of URI accept strings, or specify as the access parameter to add the URI to the list of URI connect strings.
Calling on an instance will have no effect as permission is granted to all URIs.
It is recommended that you create using the , , and flags.
A candidate URI string is checked against the list of relevant regular expressions ( or ) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a and checked against the appropriate list.
Adds the specified URI with the specified access rights to the current .
A NetworkAccess that specifies the access rights that are granted to the URI.
A regular expression that describes the set of URIs to which access rights are granted.
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Collections.IEnumerator
To be added.
This property gets a list of remote resources that are permitted by this . The class to which you have applied only has permission to connect with resources found in this list.
You can add URIs to this list using .
A candidate URI string is checked against the list of relevant regular expressions ( or ) in two ways. First, the candidate URI string is checked against the appropriate list; then, if there is no match, the candidate URI string is converted into a and checked against the appropriate list.
This property returns an enumeration of a single connect permissions held by this . The possible objects types contained in the returned enumeration are and .
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Security.IPermission
The returned by this method represents the same access to resources as the original . This method overrides and is implemented to support the interface.
Creates a copy of a .
A new instance of the class that has the same values as the original.
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Void
is .
does not contain the encoding for a instance.
The method reconstructs a from an XML encoding that is defined by the class.
Use the method to XML-encode the , including state information.
Reconstructs a from an XML encoding.
The XML encoding from which to reconstruct the .
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Security.IPermission
is .
is not and is not of type .
returns a that contains those permissions that are common in both and the current instance.
This method overrides and is implemented to support the interface.
Returns the logical intersection of two instances.
A new that represents the intersection of the current instance and the parameter. If the intersection is empty, the method returns null.
The to compare with the current instance.
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Boolean
is not of type .
If the current specifies a set of associated resources that is wholly contained by the parameter, then the current is a subset of . This method overrides and is implemented to support the interface.
Determines whether the current is a subset of the specified object.
true if the current instance is a subset of the parameter; otherwise, false. If the target is null, the method returns true for an empty current permission that is not unrestricted and false otherwise.
The to compare to the current .
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Boolean
If is , then the target class can use all URIs. Otherwise, specific permission must be given for any URI you want to use with the target class.
Use to add a URI and specify its permissions.
Checks the overall permission state of the .
true if the was created with the ; otherwise, false.
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Security.SecurityElement
Use the method to restore the state information from a .
Creates an XML encoding of a and its current state.
A that contains an XML-encoded representation of the , including state information.
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Security.IPermission
is .
is not and is not of type .
returns a that contains all the permissions in both and the current instance.
Returns the logical union between two instances of the class.
A that represents the union of the current instance and the parameter. If either WebPermission is , the method returns a that is . If the target is null, the method returns a copy of the current .
The to combine with the current .
0
0