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
The public static fields exposed in ServicePointManager are not thread safe. Changing one of these values in one thread will change the value for any other thread subsequently accessing the field.
System.Object
is a static class used to create, maintain, and delete instances of the class.
When an application requests a connection to an Internet resource Uniform Resource Identifier (URI) through the object, the returns a object that contains connection information for the host and scheme identified by the URI. If there is an existing object for that host and scheme, the object returns the existing object; otherwise, the object creates a new object.
Manages the collection of objects.
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Obsolete("Use ServerCertificateValidationCallback instead", false)
System.Net.ICertificatePolicy
To be added.
When the property is set to an interface object, the object uses the certificate policy defined in that instance instead of the default certificate policy.
The default certificate policy allows valid certificates and valid certificates that have expired.
Gets or sets policy for server certificates.
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.MonoTODO("CRL checks not implemented")
System.Boolean
To be added.
When the is true, the certificate is checked against the certificate authority revocation list, as part of the certificate validation process. Its default value is false.
Gets or sets a value that indicates whether the certificate is checked against the certificate authority revocation list.
Property
4.0.0.0
System.Net.CipherSuitesCallback
You can filter and/or re-order the ciphers suites that will be sent to the SSL/TLS server by providing your own callback.
Your custom delegate or null for the default behaviour.
This mechanism cannot be used to add new ciphers. Undefined ciphers will be ignored.
This API is only available in Mono and Xamarin products.
You can filter and/or re-order the ciphers suites that the SSL/TLS server
will accept from a client. The first match for a supported client cipher suite
will be used (so the order is important).
The following example removes weak (export) ciphers from the list that will be offered to the server.
ServicePointManager.ClientCipherSuitesCallback += (SecurityProtocolType p, IEnumerable<string> allCiphers) => {
return from cipher in allCiphers where !cipher.Contains ("EXPORT")
select cipher;
};
Example: Use AES128 (preference) or AES256 (allowed) but no other ciphers.
ServicePointManager.ClientCipherSuitesCallback += (SecurityProtocolType p, IEnumerable<string> allCiphers) => {
string prefix = p == SecurityProtocolType.Tls ? "TLS_" : "SSL_";
return new List<string> { prefix + "RSA_WITH_AES_128_CBC_SHA", prefix + "RSA_WITH_AES_256_CBC_SHA" };
};
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Int32
2
A containing the maximum number of concurrent connections allowed by a instance.
The value specified for a set operation is less than or equal to zero.
The property sets the default maximum number of concurrent connections that the object assigns to the property when creating objects.
Changing the property has no effect on existing objects; it affects only objects that are initialized after the change. If the value of this property has not been set either directly or through configuration, the value defaults to the constant .
Any changes to the property affect both HTTP 1.0 and HTTP 1.1 connections. It is not possible to separately alter the connection limit for HTTP 1.0 and HTTP 1.1 protocols. When used in the server environment (ASP.NET) defaults to higher number of connections, which is 10.
Gets or sets the maximum number of concurrent connections allowed by a object.
0
Field
1.0.5000.0
2.0.0.0
4.0.0.0
System.Int32
4
This field is read-only.
The value of this field is
4.
The default number of non-persistent connections (4) allowed on a object connected to an HTTP/1.0 or later server. This field is constant but is no longer used in the .NET Framework 2.0.
0
Field
1.0.5000.0
2.0.0.0
4.0.0.0
System.Int32
2
This field is read-only.
The value of this field is
2.
The default number of persistent connections (2) allowed on a object connected to an HTTP/1.1 or later server. This field is constant and is used to initialize the property if the value of the property has not been set either directly or through configuration.
0
Property
2.0.0.0
4.0.0.0
System.MonoTODO
System.Int32
To be added.
To be added.
Gets or sets a value that indicates how long a Domain Name Service (DNS) resolution is considered valid.
Property
2.0.0.0
4.0.0.0
System.MonoTODO
System.Boolean
To be added.
When more than one IP address is associated with a host name, a DNS resolution normally returns only the first IP address. If you set this property to true, then subsequent DNS resolutions will cycle through all available IP addresses for a particular host. This option is useful when a service uses DNS as a load balancing mechanism between servers or server clusters.
Gets or sets a value that indicates whether a Domain Name Service (DNS) resolution rotates among the applicable Internet Protocol (IP) addresses.
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Boolean
To be added.
When this property is set to true, 100-Continue behavior is used. Client requests that use the PUT and POST methods will add an Expect header to the request if the property is true and property is greater than zero or the property is true. The client will expect to receive a 100-Continue response from the server to indicate that the client should send the data to be posted. This mechanism allows clients to avoid sending large amounts of data over the network when the server, based on the request headers, intends to reject the request.
For example, assume the property is false. When the request is sent to the server, it includes the data. If, after reading the request headers, the server requires authentication and must send a 401 response, the client must resend the data with proper authentication headers.
If this property is true, the request headers are sent to the server. If the server has not rejected the request, it sends a 100-Continue response signaling that the data can be transmitted. If, as in the preceding example, the server requires authentication, it sends the 401 response and the client has not unnecessarily transmitted the data.
Changing the value of this property does not affect existing objects. Only new objects created after the change are affected.
The 100-Continue behavior is not used for HTTP 1.0 requests even if this property is set to true.
The Expect 100-Continue behavior is fully described in IETF RFC 2616 Section 10.1.1.
Gets or sets a value that determines whether 100-Continue behavior is used.
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Net.ServicePoint
is .
The maximum number of service points defined in has been reached and there is no service point that connects to the specified host.
The method returns the object associated with the specified Internet host name. If no object exists for that host, the object creates one.
Finds an existing object or creates a new object to manage communications with the specified object.
The object that manages communications for the request.
The object of the Internet resource to contact.
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Net.ServicePoint
is .
The URI specified in is in an invalid form.
The maximum number of service points defined in has been reached and there is no service point that connects to the specified host.
The method returns the object associated with the specified Internet host name. If no object exists for that host, the object creates one.
Finds an existing object or creates a new object to manage communications with the specified Uniform Resource Identifier (URI).
The object that manages communications for the request.
The URI of the Internet resource to be contacted.
The proxy data for this request.
0
Method
1.0.5000.0
2.0.0.0
4.0.0.0
System.Net.ServicePoint
is .
The maximum number of service points defined in has been reached and there is no service point that connects to the specified host.
The method returns the object associated with the specified Internet host name. If no object exists for that host, the object creates one.
Finds an existing object or creates a new object to manage communications with the specified object.
The object that manages communications for the request.
A object that contains the address of the Internet resource to contact.
The proxy data for this request.
0
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Int32
900000
A containing the maximum idle time, in milliseconds, of a instance.
The value specified for a set operation is less than or greater than
The property sets the maximum idle time that the object assigns to the property when creating objects. Changes to this value affect only objects that are initialized after the value is changed.
After a object has been idle for the time specified in , it is eligible for garbage collection. A object is idle when the list of connections associated with the object is empty.
Gets or sets the maximum idle time of a object.
0
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Int32
0
A containing the maximum number of instances to maintain.
The value specified for a set operation is less than zero or greater than
When you reduce the property below the number of objects currently in existence, the deletes the objects with the longest idle times. If the number of objects with active connections is greater than the value of , the object deletes the objects as they become idle.
Gets or sets the maximum number of objects to maintain at any time.
0
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Net.SecurityProtocolType
To be added.
This property selects the version of the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocol to use for new connections that use the Secure Hypertext Transfer Protocol (HTTPS) scheme only; existing connections are not changed.
Gets or sets the security protocol used by the objects managed by the object.
Property
2.0.0.0
4.0.0.0
System.Net.Security.RemoteCertificateValidationCallback
To be added.
An application can set the property to a method to use for custom validation by the client of the server certificate. When doing custom validation, the parameter passed to the can be a host string name or an object derived from (, for example) depending on the property.
When custom validation is not used, the certificate name is compared with host name used to create the request. For example, if was passed a parameter of "https://www.contoso.com/default.hmtl", the default behavior is for the client to check the certificate against www.contoso.com.
Gets or sets the callback to validate a server certificate.
Property
4.0.0.0
System.Net.CipherSuitesCallback
You can filter and/or re-order the ciphers suites that the SSL/TLS server
will accept from a client. The first match for a supported client cipher suite
will be used (so the order is important).
Your custom delegate or null for the default behaviour.
This mechanism cannot be used to add new ciphers. Undefined ciphers will be ignored.
This API is only available in Mono and Xamarin products.
The following example let the server accept AES128 (prefered cipher) or AES256 (allowed cipher) but no other cipher suite.
ServicePointManager.ClientCipherSuitesCallback += (SecurityProtocolType
p, IEnumerable<string> allCiphers) => {
string prefix = p == SecurityProtocolType.Tls ? "TLS_" : "SSL_";
return new List<string> { prefix + "RSA_WITH_AES_128_CBC_SHA",
prefix + "RSA_WITH_AES_256_CBC_SHA" };
};
Method
4.0.0.0
System.Void
An application can request that a TCP/IP provider enable the use of keep-alive packets on a TCP connection. The default is that the use of keep-alive packets on a TCP connection is disabled.
The default settings when a TCP socket is initialized sets the keep-alive timeout to 2 hours and the keep-alive interval to 1 second. The parameter specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent. The parameter specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received. The number of keep-alive probes cannot be changed and is set to 10.
If a TCP connection is dropped as the result of keep-alives, a of is returned to any calls in progress on the socket, and any subsequent calls will fail with a of .
Enables or disables the keep-alive option on a TCP connection.
If set to true, then the TCP keep-alive option on a TCP connection will be enabled using the specified and values.
Specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent.
Specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received.
Property
1.0.5000.0
2.0.0.0
4.0.0.0
System.Boolean
To be added.
The Nagle algorithm is used to reduce network traffic by buffering small packets of data and transmitting them as a single packet. This process is also referred to as "nagling"; it is widely used because it reduces the number of packets transmitted and lowers the overhead per packet.
Changing the value of this property does not affect existing objects. Only new service points created after the change are affected.
The Nagle algorithm is fully described in IETF RFC 896.
Determines whether the Nagle algorithm is used by the service points managed by this object.
0