diff --git a/xml/System.Net.Cache/HttpCacheAgeControl.xml b/xml/System.Net.Cache/HttpCacheAgeControl.xml
index e37a41f810d..16ba48b1bb0 100644
--- a/xml/System.Net.Cache/HttpCacheAgeControl.xml
+++ b/xml/System.Net.Cache/HttpCacheAgeControl.xml
@@ -53,7 +53,7 @@
## Examples
The following code example creates a policy based on MaxAgeAndMinFresh.
-
+
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::
]]>
@@ -300,7 +300,7 @@
0
- For internal use only. The Framework will throw an if you try to use this member.
+ For internal use only. An is thrown if you try to use this member.
diff --git a/xml/System.Net.Cache/HttpRequestCacheLevel.xml b/xml/System.Net.Cache/HttpRequestCacheLevel.xml
index eb7c6d38432..76ff4f50d5c 100644
--- a/xml/System.Net.Cache/HttpRequestCacheLevel.xml
+++ b/xml/System.Net.Cache/HttpRequestCacheLevel.xml
@@ -49,25 +49,15 @@
## Remarks
This enumeration is used to set the cache level specified by objects.
- This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.
-
The property is used to get or set the default cache policy for instances. The property is used to get or set the default cache policy for a instance. The property is used to get or set the cache policy for a specific request.
A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.
-
-
-## Examples
- The following code example sets the application domain's caching policy to Default.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
-
]]>
Cache Management for Network Applications
- RequestCaching Element (Network Settings)
@@ -107,7 +97,7 @@
1
- Satisfies a request by using the server. No entries are taken from caches, added to caches, or removed from caches between the client and server. No entries are taken from caches, added to caches, or removed from caches between the client and server. This is the default cache behavior specified in the machine configuration file that ships with the .NET Framework.
+ Satisfies a request by using the server. No entries are taken from caches, added to caches, or removed from caches between the client and server.
diff --git a/xml/System.Net.Cache/HttpRequestCachePolicy.xml b/xml/System.Net.Cache/HttpRequestCachePolicy.xml
index a82f85978d5..78169a27592 100644
--- a/xml/System.Net.Cache/HttpRequestCachePolicy.xml
+++ b/xml/System.Net.Cache/HttpRequestCachePolicy.xml
@@ -48,19 +48,12 @@
property or the application or machine configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
+ You can specify a default cache policy for your application by using the property.
You can specify the cache policy for an individual request by using the property.
Caching for Web services is not supported.
-
-
-## Examples
- The following code example creates a default cache policy for the application domain, and overrides it for a request.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
-
]]>
Cache Management for Network Applications
@@ -527,14 +520,7 @@
as their cache policy level. The property, if not `null`, determines the cache policy in effect for a request. The default policy for the application domain can be set using the property or by settings in the machine or application configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
-
-
-
-## Examples
- The following code example demonstrates displaying the value of this property.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
+ Applications typically use as their cache policy level. The property, if not `null`, determines the cache policy in effect for a request. The default policy can be set using the property.
]]>
diff --git a/xml/System.Net.Cache/RequestCacheLevel.xml b/xml/System.Net.Cache/RequestCacheLevel.xml
index 0dad264554d..a9983b43f33 100644
--- a/xml/System.Net.Cache/RequestCacheLevel.xml
+++ b/xml/System.Net.Cache/RequestCacheLevel.xml
@@ -49,8 +49,6 @@
## Remarks
Members of this enumeration are used to initialize objects. The current setting for a object is available in the property.
- This value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.
-
The property is used to get or set the default cache policy for instances. The property is used to get or set the default cache policy for a instances. The property is used to get or set the cache policy for a specific request.
If the cache behavior is `CacheIfAvailable` or `Revalidate`, a copy of a requested resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. With `CacheIfAvailable`, subsequent requests for the same resource would use a cached copy. With `Revalidate`, subsequent requests for the same resource would use a cached copy if the timestamp for the cached resource is the same as the timestamp of the resource on the server.
@@ -67,7 +65,6 @@ A copy of a resource is only added to the cache if the response stream for the r
Cache Management for Network Applications
- RequestCaching Element (Network Settings)
@@ -107,7 +104,7 @@ A copy of a resource is only added to the cache if the response stream for the r
1
- Satisfies a request by using the server. No entries are taken from caches, added to caches, or removed from caches between the client and server. This is the default cache behavior specified in the machine configuration file that ships with the .NET Framework.
+ Satisfies a request by using the server. No entries are taken from caches, added to caches, or removed from caches between the client and server.
diff --git a/xml/System.Net.Cache/RequestCachePolicy.xml b/xml/System.Net.Cache/RequestCachePolicy.xml
index d59afeaf0e9..61a85096d39 100644
--- a/xml/System.Net.Cache/RequestCachePolicy.xml
+++ b/xml/System.Net.Cache/RequestCachePolicy.xml
@@ -48,14 +48,12 @@
property or the application or machine configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
+ You can specify a default cache policy for your application by using the property.
You can specify the cache policy for an individual request by using the property.
Caching for Web services is not supported.
-
-
## Examples
The following code example creates a policy with set to , and uses it to set the cache policy of a .
@@ -231,14 +229,7 @@
## Remarks
Applications typically use as their cache policy level. Using the level, the effective cache policy is determined by the current cache policy and the age of the content in the cache. The property, if not `null`, determines the cache policy in effect for a request.
- The default policy for the application domain can be set using the or the application or machine configuration file. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
-
-
-
-## Examples
- The following code example creates a policy and sends a request.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+You can set the default policy using the property.
]]>
diff --git a/xml/System.Net.Http/HttpClient.xml b/xml/System.Net.Http/HttpClient.xml
index a1003059876..a9a5f8735b8 100644
--- a/xml/System.Net.Http/HttpClient.xml
+++ b/xml/System.Net.Http/HttpClient.xml
@@ -589,11 +589,8 @@ This property has no effect on any of the object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations:
->
-> - that nests a is thrown on .NET 5 and later versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - is thrown on all applicable .NET Framework versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The request message was already sent by the instance.
@@ -605,12 +602,8 @@ The is not an absolute URI.
-or-
is not set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by .
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by .
+ The request failed due to timeout.
@@ -666,11 +659,8 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations:
->
-> - that nests a is thrown on .NET 5 and later versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - is thrown on all applicable .NET Framework versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The request message was already sent by the instance.
@@ -682,12 +672,8 @@ The is not an absolute URI.
-or-
is not set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -749,11 +735,8 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
->
-> - that nests a is thrown on .NET 5 and later versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - is thrown on all applicable .NET Framework versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The request message was already sent by the instance.
@@ -765,16 +748,12 @@ The is not an absolute URI.
-or-
is not set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -832,11 +811,8 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
]]>
The request message was already sent by the instance.
@@ -848,16 +824,12 @@ The is not an absolute URI.
-or-
is not set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -988,19 +960,13 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read. The behavior is the same as if has been explicitly specified.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -1057,19 +1023,13 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read. The behavior is the same as if has been explicitly specified.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -1131,15 +1091,13 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete based on the `completionOption` parameter after the part or all of the response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -1202,24 +1160,18 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read. The behavior is the same as if has been explicitly specified.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The provided request URI is not valid relative or absolute URI.
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -1277,19 +1229,13 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete based on the `completionOption` parameter after the part or all of the response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -1347,23 +1293,17 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete after the whole response (including content) is read. The behavior is the same as if has been explicitly specified.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- TThe request failed due to an issue getting an HTTP response such as network connectivity, DNS failure or server certificate validation. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ TThe request failed due to an issue getting an HTTP response such as network connectivity, DNS failure or server certificate validation. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -1427,24 +1367,18 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete based on the `completionOption` parameter after the part or all of the response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The provided request URI is not valid relative or absolute URI.
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -1504,23 +1438,17 @@ The is not an absolute URI.
This operation doesn't block. The returned object will complete based on the `completionOption` parameter after the part or all of the response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -1601,10 +1529,8 @@ The is not an absolute URI.
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
@@ -1612,12 +1538,8 @@ In some scenarios, you might need more control over which status codes are consi
-or-
-The response status code was outside of the range of 200-299 (which indicate success according to the standard).
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+The response status code was outside of the range of 200-299 (which indicate success according to the standard).
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -1676,10 +1598,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, that nests a is thrown.
]]>
@@ -1688,12 +1607,8 @@ In some scenarios, you might need more control over which status codes are consi
-or-
-The response status code was outside of the range of 200-299 (which indicate success according to the standard).
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+The response status code was outside of the range of 200-299 (which indicate success according to the standard).
+ The request failed due to timeout.
@@ -1749,10 +1664,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, that nests a is thrown.
]]>
@@ -1766,7 +1678,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -1818,10 +1730,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, that nests a is thrown.
]]>
@@ -1835,7 +1744,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -1916,10 +1825,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
@@ -1927,12 +1834,8 @@ In some scenarios, you might need more control over which status codes are consi
-or-
-The response status code was outside of the range of 200-299 (which indicate success according to the standard).
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+The response status code was outside of the range of 200-299 (which indicate success according to the standard).
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -1991,10 +1894,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
@@ -2002,12 +1903,8 @@ In some scenarios, you might need more control over which status codes are consi
-or-
-The response status code was outside of the range of 200-299 (which indicate success according to the standard).
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+The response status code was outside of the range of 200-299 (which indicate success according to the standard).
+ The request failed due to timeout.
@@ -2063,17 +1960,15 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws an without any inner exception.
-> - .NET 5 and later versions throw an that nests a .
+> In case of a timeout: an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
The is .
The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
@@ -2132,10 +2027,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is .
@@ -2148,7 +2041,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -2229,10 +2122,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
@@ -2240,12 +2131,8 @@ In some scenarios, you might need more control over which status codes are consi
-or-
-The response status code was outside of the range of 200-299 (which indicate success according to the standard).
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+The response status code was outside of the range of 200-299 (which indicate success according to the standard).
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -2304,10 +2191,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
@@ -2315,12 +2200,8 @@ In some scenarios, you might need more control over which status codes are consi
-or-
-The response status code was outside of the range of 200-299 (which indicate success according to the standard).
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+The response status code was outside of the range of 200-299 (which indicate success according to the standard).
+ The request failed due to timeout.
@@ -2376,10 +2257,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is .
@@ -2393,7 +2272,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -2445,10 +2324,8 @@ The response status code was outside of the range of 200-299 (which indicate suc
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
> [!NOTE]
-> In case of a timeout:
-> - .NET Framework throws a .
-> - .NET Core throws a without any inner exception.
-> - .NET 5 and later versions throw a that nests a .
+> In case of a timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is .
@@ -2461,7 +2338,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -2843,19 +2720,13 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -2914,19 +2785,13 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -2993,24 +2858,18 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The provided request URI is not valid relative or absolute URI.
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3070,23 +2929,17 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3170,19 +3023,13 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
The provided request URI is not valid relative or absolute URI.
@@ -3241,19 +3088,13 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -3320,24 +3161,18 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The provided request URI is not valid relative or absolute URI.
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3397,23 +3232,17 @@ The size specified is greater than the maximum allowed buffer size.
This operation doesn't block. The returned object will complete after the whole response (including content) is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown. (On .NET Core versions, without any inner exception is thrown.)
+
]]>
The is not an absolute URI and isn't set.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3618,7 +3447,7 @@ The custom does not override
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3691,7 +3520,7 @@ The custom does not override
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3758,10 +3587,7 @@ The custom does not override
This operation doesn't block. The returned object will complete once the entire response including content is read. The behavior is the same as if has been explicitly specified.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown.
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
@@ -3769,12 +3595,8 @@ This method stores in the task it returns all non-usage exceptions that the meth
The is .
The request message was already sent by the instance.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -3824,10 +3646,7 @@ This method stores in the task it returns all non-usage exceptions that the meth
This operation doesn't block. Depending on the value of the `completionOption` parameter, the returned object will complete as soon as a response is available or the entire response including content is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown.
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
@@ -3835,12 +3654,8 @@ This method stores in the task it returns all non-usage exceptions that the meth
The is .
The request message was already sent by the instance.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
- .NET Core and .NET 5 and later only: The request failed due to timeout.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
+ The request failed due to timeout.
@@ -3890,10 +3705,7 @@ This method stores in the task it returns all non-usage exceptions that the meth
This operation doesn't block. The returned object will complete once the entire response including content is read. The behavior is the same as if has been explicitly specified.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown.
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
@@ -3901,16 +3713,12 @@ This method stores in the task it returns all non-usage exceptions that the meth
The is .
The request message was already sent by the instance.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: The request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
@@ -3962,10 +3770,7 @@ This method stores in the task it returns all non-usage exceptions that the meth
This operation doesn't block. Depending on the value of the `completionOption` parameter, the returned object will complete as soon as a response is available or the entire response including content is read.
> [!NOTE]
-> In case of timeout, different exceptions are thrown on different .NET implementations.
-> - is thrown on all applicable .NET Framework versions.
-> - without any inner exception is thrown on all applicable .NET Core versions.
-> - that nests a is thrown on .NET 5 and later versions.
+> In case of timeout, an that nests a is thrown.
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
@@ -3973,16 +3778,12 @@ This method stores in the task it returns all non-usage exceptions that the meth
The is .
The request message was already sent by the instance.
- The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
-
--or-
-
-.NET Framework only: the request timed out.
+ The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by
The cancellation token was canceled. This exception is stored into the returned task.
-or-
-.NET Core and .NET 5 and later only: The request failed due to timeout.
+The request failed due to timeout.
diff --git a/xml/System.Net.Http/HttpClientHandler.xml b/xml/System.Net.Http/HttpClientHandler.xml
index 2cac07b770e..7bb75c963e0 100644
--- a/xml/System.Net.Http/HttpClientHandler.xml
+++ b/xml/System.Net.Http/HttpClientHandler.xml
@@ -129,15 +129,14 @@
## Remarks
Set to `true` if you want the handler to automatically follow HTTP redirection headers to the new location of the resource. The maximum number of redirections to follow is set by the property.
- If is set to `false`, all HTTP responses with an HTTP status code from 300 to 399 are returned to the application.
+ If is set to `false`, all HTTP responses with an HTTP status code from 300 to 399 are returned to the application.
The Authorization header is cleared on auto-redirects and the handler automatically tries to re-authenticate to the redirected location. No other headers are cleared. In practice, this means that an application can't put custom authentication information into the Authorization header if it is possible to encounter redirection. Instead, the application must implement and register a custom authentication module.
If you are using cookies by specifically adding them to the collection, these are not cleared when a redirect is followed, as the handler has no way of knowing what domain a cookie is allowed for. If you want to mimic browser behavior, use the class which allows you to specify the target domain for a cookie.
> [!NOTE]
-> On .NET Core and .NET 5 and later versions, setting to `true` **does not enable** automatic redirection to an HTTP URI from an HTTPS URI.
-> Such (secure to insecure) redirections are only followed on .NET Framework.
+> Setting to `true` **does not enable** automatic redirection to an HTTP URI from an HTTPS URI.
]]>
@@ -192,9 +191,6 @@
Setting automatic decompression to anything other than will result in adding `Accept-Encoding` header with the set values into every outgoing .
-
-For the .NET Framework 4.x `System.Net.Http` binary in the Global Assembly Cache (GAC), the default value is .
-
]]>
@@ -241,7 +237,6 @@ For the .NET Framework 4.x `System.Net.Http` binary in the Global Assembly Cache
if the certificate revocation list is checked; otherwise, .
To be added.
- .NET Framework 4.7.1 only: This property is not implemented.
@@ -330,7 +325,7 @@ For the .NET Framework 4.x `System.Net.Http` binary in the Global Assembly Cache
## Remarks
-On .NET Core, the key usage attribute on the X509 certificate, if present, is required to have the value "Digital Signature" in order to be used when sending the request.
+The key usage attribute on the X509 certificate, if present, is required to have the value "Digital Signature" in order to be used when sending the request.
]]>
@@ -1210,7 +1205,6 @@ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousA
Gets or sets the TLS/SSL protocols used by the objects managed by the HttpClientHandler object.
A bitwise combination of the enumeration values that specify the TLS/SSL protocols.
To be added.
- .NET Framework 4.7.1 only: This property is not implemented.
diff --git a/xml/System.Net.Http/HttpResponseMessage.xml b/xml/System.Net.Http/HttpResponseMessage.xml
index 6fe1503ce54..8f3687ffcf1 100644
--- a/xml/System.Net.Http/HttpResponseMessage.xml
+++ b/xml/System.Net.Http/HttpResponseMessage.xml
@@ -354,10 +354,8 @@ When the `disposing` parameter is `true`, this method releases all resources hel
## Remarks
The method throws an if is outside of the range 200-299 (the range of status codes indicating success according to the standard).
-
- In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
- In .NET Framework, if the is not `null`, this method also calls to free managed and unmanaged resources. Starting with .NET Core 3.0, the content is not disposed.
+ In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if matches the expected value.
]]>
diff --git a/xml/System.Net.Http/SocketsHttpHandler.xml b/xml/System.Net.Http/SocketsHttpHandler.xml
index 0b08b1a988a..068255b8ec9 100644
--- a/xml/System.Net.Http/SocketsHttpHandler.xml
+++ b/xml/System.Net.Http/SocketsHttpHandler.xml
@@ -949,7 +949,7 @@ For example, if the value is 64, then 65,536 bytes are allowed for the maximum r
Gets or sets how long a connection can be idle in the pool to be considered reusable.
- The maximum idle time for a connection in the pool. The default value for this property is 1 minute in .NET 6 and later versions; the default value is 2 minutes in .NET Core and .NET 5
+ The maximum idle time for a connection in the pool. The default value for this property is 1 minute in .NET 6 and later versions; the default value is 2 minutes in .NET Core and .NET 5.
To be added.
The value specified is less than and is not .
An operation has already been started on the current instance.
diff --git a/xml/System.Net.Http/WinHttpHandler.xml b/xml/System.Net.Http/WinHttpHandler.xml
index b31b069c32f..3134067bd77 100644
--- a/xml/System.Net.Http/WinHttpHandler.xml
+++ b/xml/System.Net.Http/WinHttpHandler.xml
@@ -60,8 +60,7 @@ Starting in .NET 5, is no longer included
Starting with version 6.0.0, supports trailing headers, also known as trailers ([RFC 7230 - 4.1.2. Chunked Trailer Part](https://tools.ietf.org/html/rfc7230#section-4.1.2)).
-- On .NET Standard 2.1 and .NET 8 or later, trailers are added to .
-- On .NET Framework, trailers are added to a well-known property in on the request object corresponding to the response (). The name of the property is `__ResponseTrailers`, the type of the property value is .
+Trailers are added to .
Trailer support is implemented via the `WINHTTP_QUERY_FLAG_TRAILERS` [Query Info Flag](/windows/win32/winhttp/query-info-flags) which has been introduced in Windows 11, version 21H2 (10.0; Build 22000). On Windows systems where `WINHTTP_QUERY_FLAG_TRAILERS` is unsupported, trailers are ignored.
diff --git a/xml/System.Net.Mail/MailMessage.xml b/xml/System.Net.Mail/MailMessage.xml
index 235f7fde750..7386748805a 100644
--- a/xml/System.Net.Mail/MailMessage.xml
+++ b/xml/System.Net.Mail/MailMessage.xml
@@ -162,14 +162,7 @@
Initializes an empty instance of the class.
-
-
-
+ To be added.
@@ -691,9 +684,7 @@
## Remarks
The value specified for the property sets the character set field in the Content-Type header. The default character set is `"us-ascii"`.
- If you set the property to , , or , the Framework selects a of for this .
-
-
+ If you set the property to , , or , .NET selects a of for this .
## Examples
The following code example demonstrates creating a mail message that uses UTF8 encoding.
diff --git a/xml/System.Net.Mail/SmtpAccess.xml b/xml/System.Net.Mail/SmtpAccess.xml
index 342a6fa327e..95082543b08 100644
--- a/xml/System.Net.Mail/SmtpAccess.xml
+++ b/xml/System.Net.Mail/SmtpAccess.xml
@@ -36,21 +36,7 @@
Specifies the level of access allowed to a Simple Mail Transport Protocol (SMTP) server.
-
- enumeration is used by the and classes to specify a level of access to an SMTP host computer. The class demands an when sending electronic mail to the SMTP host for delivery.
-
-
-
-## Examples
- The following code example uses the enumeration to create a permission object.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/SmtpAccess/Overview/mailpermissions.cs" id="Snippet1":::
-
- ]]>
-
+ To be added.
diff --git a/xml/System.Net.Mail/SmtpClient.xml b/xml/System.Net.Mail/SmtpClient.xml
index 70e41926ae6..9e65fa7273b 100644
--- a/xml/System.Net.Mail/SmtpClient.xml
+++ b/xml/System.Net.Mail/SmtpClient.xml
@@ -66,12 +66,6 @@ The `SmtpClient` class is used to send email to an SMTP server for delivery. The
> [!IMPORTANT]
> We don't recommend that you use the `SmtpClient` class for new development because `SmtpClient` doesn't support many modern protocols. Use [MailKit](https://github.com/jstedfast/MailKit) or other libraries instead. For more information, see [SmtpClient shouldn't be used](https://github.com/dotnet/platform-compat/blob/master/docs/DE0005.md).
-The `SmtpClient` class is:
-
-- Included in .NET Standard 2.0 and later versions and therefore must be part of any .NET implementation that supports those versions.
-- Present and can be used in .NET Framework 4 through .NET Framework 4.8.
-- Usable in .NET (Core), but its use isn't recommended.
-
The classes shown in the following table are used to construct email messages that can be sent using .
| Class | Description |
@@ -90,7 +84,7 @@ The classes shown in the following table are used to construct email messages th
To include an attachment with an email message, first create the attachment by using the class, and then add it to the message by using the property. Depending on the email reader used by the recipients and the file type of the attachment, some recipients might not be able to read the attachment. For clients that cannot display the attachment in its original form, you can specify alternate views by using the property.
- In .NET Framework, you can use the application or machine configuration files to specify default host, port, and credentials values for all objects. For more information, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings). .NET Core does not support setting defaults. As a workaround, you must set the relevant properties on directly.
+To specify host, port, and credentials values for all objects, set the relevant properties on directly.
To send the email message and block while waiting for the email to be transmitted to the SMTP server, use one of the synchronous methods. To allow your program's main thread to continue executing while the email is transmitted, use one of the asynchronous methods. The event is raised when a operation completes. To receive this event, you must add a delegate to . The delegate must reference a callback method that handles notification of events. To cancel an asynchronous email transmission, use the method.
@@ -117,10 +111,6 @@ The following code example demonstrates sending an email message asynchronously.
]]>
- Network Programming in the .NET Framework
- Network Programming Samples
- Network Tracing in the .NET Framework
- Security in Network Programming
@@ -166,24 +156,8 @@ The following code example demonstrates sending an email message asynchronously.
- Initializes a new instance of the class by using configuration file settings.
-
- , , and properties for the new by using the settings in the application or machine configuration files. For more information, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings).
-
-
-
-## Examples
- The following code example demonstrates sending an email message.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet4":::
-
- For an example of the \ node in the application or machine configuration file, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings).
-
- ]]>
-
+ Initializes a new instance of the class using the default port.
+ To be added.
@@ -225,23 +199,7 @@ The following code example demonstrates sending an email message asynchronously.
A that contains the name or IP address of the host computer used for SMTP transactions.
Initializes a new instance of the class that sends email by using the specified SMTP server.
-
- property. The and properties are initialized by using the settings in the application or machine configuration files. If `host` is `null` or equal to , is initialized using the settings in the application or machine configuration files.
-
- For more information about using the application and machine configuration files, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings). If information is specified using constructors or properties, this information overrides the configuration file settings.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet3":::
-
- ]]>
-
+ To be added.
@@ -285,23 +243,7 @@ The following code example demonstrates sending an email message asynchronously.
A that contains the name or IP address of the host used for SMTP transactions.
An greater than zero that contains the port to be used on .
Initializes a new instance of the class that sends email by using the specified SMTP server and port.
-
- and properties, respectively. If `host` is `null` or equal to , is initialized using the settings in the application or machine configuration files. If `port` is zero, is initialized using the settings in the application or machine configuration files. The property is initialized using the settings in the application or machine configuration files.
-
- For more information about using the application and machine configuration files, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings). If information is specified using constructors or properties, this information overrides the configuration file settings.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet1":::
-
- ]]>
-
+ To be added.
cannot be less than zero.
@@ -348,7 +290,7 @@ The following code example demonstrates sending an email message asynchronously.
System.Security.Cryptography.X509Certificates.X509CertificateCollection
- Specify which certificates should be used to establish the Secure Sockets Layer (SSL) connection.
+ Gets the certificates that should be used to establish the Secure Sockets Layer (SSL) connection.
An , holding one or more client certificates. The default value is derived from the mail configuration attributes in a configuration file.
[!NOTE]
-> The Framework caches SSL sessions as they are created and attempts to reuse a cached session for a new request, if possible. When attempting to reuse an SSL session, the Framework uses the first element of (if there is one), or tries to reuse an anonymous sessions if is empty.
-
-
+> .NET caches SSL sessions as they are created and attempts to reuse a cached session for a new request, if possible. When attempting to reuse an SSL session, .NET uses the first element of (if there is one), or tries to reuse an anonymous sessions if is empty.
## Examples
The following code example establishes an SSL connection with the SMTP server and uses the connection to send an email.
@@ -368,7 +308,6 @@ The following code example demonstrates sending an email message asynchronously.
]]>
- MailSettings Element (Network Settings)
@@ -409,19 +348,15 @@ The following code example demonstrates sending an email message asynchronously.
Gets or sets the credentials used to authenticate the sender.
- An that represents the credentials to use for authentication; or if no credentials have been specified.
+ The credentials to use for authentication; or if no credentials have been specified.
to `true` instead of setting this property. If the property is set to `false,` then the value set in the property will be used for the credentials when connecting to the server. If the property is set to `false` and the property has not been set, then mail is sent to the server anonymously.
- Credentials information can also be specified using the application and machine configuration files. For more information, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings). If information is specified using the property, this information overrides the configuration file settings.
-
> [!CAUTION]
-> If you provide credentials for basic authentication, they are sent to the server in clear text. This can present a security issue because your credentials can be seen, and then used by others.
-
-
+> If you provide credentials for basic authentication, they are sent to the server in clear text. This can present a security issue because your credentials can be seen and used by others.
## Examples
The following code example demonstrates setting the credentials used to send an email.
@@ -527,8 +462,6 @@ The following code example demonstrates sending an email message asynchronously.
]]>
- <mailSettings> Element (Network Settings)
- <smtp> Element (Network Settings)
@@ -755,9 +688,6 @@ The following code example demonstrates sending an email message asynchronously.
]]>
- <mailSettings> Element (Network Settings)
- <smtp> Element (Network Settings)
- <network> Element (Network Settings)
@@ -799,30 +729,11 @@ The following code example demonstrates sending an email message asynchronously.
Gets or sets the name or IP address of the host used for SMTP transactions.
A that contains the name or IP address of the computer to use for SMTP transactions.
-
- property can also be set using constructors or the application or machine configuration file. For more information, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings).
-
- If information is specified using this property, this information overrides the configuration file settings.
-
-
-
-## Examples
- The following code example demonstrates sending an email message by using the host and port specified in an application configuration file.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
-
- ]]>
-
+ To be added.
The value specified for a set operation is .
The value specified for a set operation is equal to ("").
You cannot change the value of this property when an email is being sent.
- mailSettings for system.net
- <smtp> Element (Network Settings)
- <network> Element (Network Settings)
@@ -930,8 +841,6 @@ The following code example demonstrates sending an email message asynchronously.
]]>
- <mailSettings> Element (Network Settings)
- <smtp> Element (Network Settings)
@@ -972,27 +881,10 @@ The following code example demonstrates sending an email message asynchronously.
Gets or sets the port used for SMTP transactions.
An that contains the port number on the SMTP host. The default value is 25.
-
- property can also be set using constructors or the application or machine configuration file. For more information about using configuration files, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings). If information is specified using this property, this information overrides the configuration file settings.
-
-
-
-## Examples
- The following code example demonstrates sending an email message by using the host and port specified in an application configuration file.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
-
- ]]>
-
+ To be added.
The value specified for a set operation is less than or equal to zero.
You cannot change the value of this property when an email is being sent.
- mailSettings for system.net
- <smtp> Element (Network Settings)
- <network> Element (Network Settings)
@@ -2138,7 +2030,6 @@ The following code example demonstrates sending an email message asynchronously.
-or-
is zero.
- connectionManagement Element (Network Settings)
Managing Connections
@@ -2192,9 +2083,6 @@ The following code example demonstrates sending an email message asynchronously.
]]>
Integrated Windows Authentication with Extended Protection
- <mailSettings> Element (Network Settings)
- <smtp> Element (Network Settings)
- <network> Element (Network Settings)
@@ -2292,7 +2180,7 @@ The following code example demonstrates sending an email message asynchronously.
System.Boolean
- Gets or sets a value that controls whether the are sent with requests.
+ Gets or sets a value that indicates whether the are sent with requests.
if the default credentials are used; otherwise . The default value is .
@@ -2301,14 +2189,10 @@ The following code example demonstrates sending an email message asynchronously.
## Remarks
Some SMTP servers require that the client be authenticated before the server sends email on its behalf. Set this property to `true` when this object should, if requested by the server, authenticate using the default credentials of the currently logged on user. For client applications, this is the desired behavior in most scenarios.
- Credentials information can also be specified using the application and machine configuration files. For more information, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings).
-
If the property is set to `false,` then the value set in the property will be used for the credentials when connecting to the server. If the property is set to `false` and the property has not been set, then mail is sent to the server anonymously.
> [!CAUTION]
-> If you provide credentials for basic authentication, they are sent to the server in clear text. This can present a security issue because your credentials can be seen, and then used by others.
-
-
+> If you provide credentials for basic authentication, they are sent to the server in clear text. This can present a security issue because your credentials can be seen and used by others.
## Examples
The following code example demonstrates using this property.
diff --git a/xml/System.Net.Mail/SmtpPermission.xml b/xml/System.Net.Mail/SmtpPermission.xml
index 5c1ad293276..fbe36f304f9 100644
--- a/xml/System.Net.Mail/SmtpPermission.xml
+++ b/xml/System.Net.Mail/SmtpPermission.xml
@@ -49,10 +49,6 @@
[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]
- The and classes control access to SMTP host computers. The class demands an when sending electronic mail to the SMTP host for delivery.
-
- The enumeration specifies the level of access controlled by an instance of this permission.
-
]]>
@@ -98,14 +94,7 @@
if the new permission is unrestricted; otherwise, .
Initializes a new instance of the class with the specified state.
-
- access to SMTP servers. If unrestricted is `false`, the permission controls access.
-
- ]]>
-
+ To be added.
@@ -139,14 +128,7 @@
One of the values.
Initializes a new instance of the class using the specified access level.
-
-
-
+ To be added.
@@ -180,14 +162,7 @@
One of the values.
Initializes a new instance of the class using the specified permission state value.
-
-
-
+ To be added.
@@ -258,14 +233,7 @@
One of the values.
Adds the specified access level value to the permission.
-
-
-
+ To be added.
@@ -300,14 +268,7 @@
Creates and returns an identical copy of the current permission.
An that is identical to the current permission.
-
-
-
+ To be added.
@@ -344,14 +305,7 @@
The XML encoding to use to set the state of the current permission.
Sets the state of the permission using the specified XML encoding.
-
-
-
+ To be added.
does not describe an object.
@@ -397,14 +351,7 @@
An to intersect with the current permission. It must be of the same type as the current permission.
Creates and returns a permission that is the intersection of the current permission and the specified permission.
An that represents the intersection of the current permission and the specified permission. Returns if the intersection is empty or is .
-
-
-
+ To be added.
is not an .
@@ -445,14 +392,7 @@
Returns a value indicating whether the current permission is a subset of the specified permission.
if the current permission is a subset of the specified permission; otherwise, .
-
-
-
+ To be added.
is not an .
@@ -493,14 +433,7 @@
Returns a value indicating whether the current permission is unrestricted.
if the current permission is unrestricted; otherwise, .
-
-
-
+ To be added.
@@ -535,14 +468,7 @@
Creates an XML encoding of the state of the permission.
A that contains an XML encoding of the current permission.
-
-
-
+ To be added.
@@ -580,14 +506,7 @@
An to combine with the current permission.
Creates a permission that is the union of the current permission and the specified permission.
A new permission that represents the union of the current permission and the specified permission.
-
- method returns a permission that represents all the states represented by both the current permission and the specified permission. Any demand that passes either permission passes their union.
-
- ]]>
-
+ To be added.
is not an .
diff --git a/xml/System.Net.Mail/SmtpPermissionAttribute.xml b/xml/System.Net.Mail/SmtpPermissionAttribute.xml
index b157c7c20c8..8eb0109d39f 100644
--- a/xml/System.Net.Mail/SmtpPermissionAttribute.xml
+++ b/xml/System.Net.Mail/SmtpPermissionAttribute.xml
@@ -49,10 +49,6 @@
[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]
- The and classes control access to SMTP host computers. The class demands an when sending electronic mail to the SMTP host for delivery.
-
- The enumeration specifies the level of access controlled by an instance of this permission.
-
]]>
@@ -88,14 +84,7 @@
One of the values that specifies the permission behavior.
Initializes a new instance of the class.
-
-
-
+ To be added.
is not a valid .
@@ -131,14 +120,7 @@
Gets or sets the level of access to SMTP servers controlled by the attribute.
A value. Valid values are "Connect" and "None".
-
- method will throw an when called by the system.
-
- ]]>
-
+ To be added.
@@ -173,16 +155,7 @@
Creates a permission object that can be stored with the in an assembly's metadata.
An instance.
-
-
-
+ To be added.
diff --git a/xml/System.Net.NetworkInformation/NetworkChange.xml b/xml/System.Net.NetworkInformation/NetworkChange.xml
index 43297d0dc72..dfd931921f5 100644
--- a/xml/System.Net.NetworkInformation/NetworkChange.xml
+++ b/xml/System.Net.NetworkInformation/NetworkChange.xml
@@ -67,7 +67,7 @@
## Examples
The following code example listens for address changes and displays the status of network interfaces when a event occurs.
-
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/NetworkChange/Overview/changed.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Net.NetworkInformation/NetworkChange/Overview/changed.vb" id="Snippet1":::
diff --git a/xml/System.Net.NetworkInformation/NetworkInformationPermission.xml b/xml/System.Net.NetworkInformation/NetworkInformationPermission.xml
index 29603e8d3f6..31dcba35f9d 100644
--- a/xml/System.Net.NetworkInformation/NetworkInformationPermission.xml
+++ b/xml/System.Net.NetworkInformation/NetworkInformationPermission.xml
@@ -50,10 +50,6 @@
[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]
- This permission is used to secure data returned by the classes in the namespace.
-
- For declarative security, use the class.
-
]]>
@@ -100,14 +96,7 @@
One of the values.
Initializes a new instance of the class using the specified value.
-
-
-
+ To be added.
@@ -142,14 +131,7 @@
One of the values.
Initializes a new instance of the class with the specified .
-
-
-
+ To be added.
@@ -184,14 +166,7 @@
Gets the level of access to network information controlled by this permission.
One of the values.
-
- created with is given | access. A created with is given access.
-
- ]]>
-
+ To be added.
@@ -229,14 +204,7 @@
One of the values.
Adds the specified value to this permission.
-
-
-
+ To be added.
@@ -272,14 +240,7 @@
Creates and returns an identical copy of this permission.
A that is identical to the current permission.
-
-
-
+ To be added.
@@ -317,14 +278,7 @@
A that contains the XML encoding to use to set the state of the current permission.
Sets the state of this permission using the specified XML encoding.
-
-
-
+ To be added.
is .
@@ -375,14 +329,7 @@
An to intersect with the current permission. It must be of the same type as the current permission.
Creates and returns a permission that is the intersection of the current permission and the specified permission.
A that represents the intersection of the current permission and the specified permission. This new permission is if the intersection is empty or is .
-
-
-
+ To be added.
is not a .
@@ -424,14 +371,7 @@
Determines whether the current permission is a subset of the specified permission.
if the current permission is a subset of the specified permission; otherwise, .
-
-
-
+ To be added.
@@ -471,14 +411,7 @@
Returns a value indicating whether the current permission is unrestricted.
if the current permission is unrestricted; otherwise, .
-
- constructor.
-
- ]]>
-
+ To be added.
@@ -514,14 +447,7 @@
Creates an XML encoding of the state of this permission.
A that contains the XML encoding of the current permission.
-
-
-
+ To be added.
@@ -560,14 +486,7 @@
A permission to combine with the current permission.
Creates a permission that is the union of this permission and the specified permission.
A new permission that represents the union of the current permission and the specified permission.
-
- method returns a permission that represents all the states represented by both the current permission and the specified permission. Any demand that passes either permission passes their union.
-
- ]]>
-
+ To be added.
diff --git a/xml/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.xml b/xml/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.xml
index 5e95200a1c0..dcd63d70e0b 100644
--- a/xml/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.xml
+++ b/xml/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.xml
@@ -44,16 +44,12 @@
Allows security actions for to be applied to code using declarative security.
- namespace.
-
- The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the class.
-
]]>
@@ -90,14 +86,7 @@
A value that specifies the permission behavior.
Initializes a new instance of the class.
-
-
-
+ To be added.
@@ -132,20 +121,7 @@
Gets or sets the network information access level.
A string that specifies the access level.
-
-
-
+ To be added.
@@ -181,14 +157,7 @@
Creates and returns a new object.
A that corresponds to this attribute.
-
-
-
+ To be added.
diff --git a/xml/System.Net.NetworkInformation/PhysicalAddress.xml b/xml/System.Net.NetworkInformation/PhysicalAddress.xml
index a4b74b5eaf9..151e0a86851 100644
--- a/xml/System.Net.NetworkInformation/PhysicalAddress.xml
+++ b/xml/System.Net.NetworkInformation/PhysicalAddress.xml
@@ -467,27 +467,17 @@
method to retrieve the address from an existing instance.
-
-
## Examples
The following code example creates a instance by calling the method.
diff --git a/xml/System.Net.NetworkInformation/Ping.xml b/xml/System.Net.NetworkInformation/Ping.xml
index b59a82cfc80..95d69921909 100644
--- a/xml/System.Net.NetworkInformation/Ping.xml
+++ b/xml/System.Net.NetworkInformation/Ping.xml
@@ -114,10 +114,6 @@
]]>
- How to: Ping a Host
- Network Programming in the .NET Framework
- Network Programming Samples
- NetworkInformation
diff --git a/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermission.xml b/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermission.xml
index d9360bdd72f..a2a4a22b748 100644
--- a/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermission.xml
+++ b/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermission.xml
@@ -49,10 +49,6 @@
[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]
- The default allow all local and Intranet zone applications to access collaboration services, and no permission is granted for Internet zone applications. In other words, if the default permissions are not changed, all link-local and site-local applications have access to Peer-To-Peer collaboration services, but global applications have no access.
-
- This class is not derivable.
-
]]>
@@ -91,16 +87,7 @@
One of the values in the enumeration.
Initializes a new instance of the . The initial for this instance is passed when the constructor is called.
-
- , the instance passes all demands. If state contains any other value, the instance fails all demands.
-
- ]]>
-
+ To be added.
@@ -137,14 +124,7 @@
Creates and returns a copy of the current .
A that contains a copy of the current instance of .
-
- instance grants the same access to resources as the original permission.
-
- ]]>
-
+ To be added.
@@ -182,16 +162,7 @@
The XML encoding to use to reconstruct the permission.
Represents the XML object model for encoding security objects.
-
-
-
+ To be added.
The parameter is not a valid permission element.
-or-
@@ -241,22 +212,7 @@ The parameter's version number is not supported.
Permission to with the current permission. It must be of the same type as the current permission.
Creates and returns a permission that is the intersection of the current and the specified permission.
A new permission that represents the intersection of the current and the specified permission. This new permission is a reference ( in Visual Basic) if the intersection is empty.
-
- method. X and Y represent object references that are not a `null` reference (`Nothing` in Visual Basic).
-
-- X.Intersect(X) returns a value equal to X.
-
-- X.Intersect(Y) returns the same value as Y.Intersect(X).
-
-- X.Intersect(a `null` reference) returns a `null` reference.
-
- ]]>
-
+ To be added.
The target parameter is not a reference ( in Visual Basic) and is not an instance of the same class as the current permission.
@@ -299,24 +255,7 @@ The parameter's version number is not supported.
Determines whether the current is a subset of the specified permission.
if the current is a subset of the specified permission; otherwise, .
-
- is a subset of the specified permission if the current permission specifies a set of operations that is wholly contained by the specified permission. For example, a permission that represents access to "*C:\example.txt*" is a subset of a permission that represents access to "*C:\\*". If this method returns `true`, the current permission represents no more access to the protected resource than does the specified permission.
-
- The following statements are required to be `true` for all implementations of the method. X, Y, and Z represent objects that are not a `null` reference (`Nothing` in Visual Basic).
-
-- X.IsSubsetOf(X) returns `true`.
-
-- X.IsSubsetOf(Y) returns the same value as Y.IsSubsetOf(X) if and only if X and Y represent the same set of permissions.
-
-- If X.IsSubsetOf(Y) and Y.IsSubsetOf(Z) both return `true`, X.IsSubsetOf(Z) returns `true`.
-
- If X represents an empty object with a permission state of `None`, and Y represents an `IPermission` object that is a `null` reference (`Nothing` in Visual Basic), X.IsSubsetOf(Y) returns `true`. If Z is also an empty permission, the compound set operation X.Union(Z).IsSubsetOf(Y) also returns `true` because the of two empty permissions is an empty permission.
-
- ]]>
-
+ To be added.
The parameter is a reference ( in Visual Basic).
@@ -359,14 +298,7 @@ The parameter's version number is not supported.
Returns a value specifying whether the current is unrestricted.
if the current permission is unrestricted; otherwise, .
-
-
-
+ To be added.
@@ -404,14 +336,7 @@ The parameter's version number is not supported.
Creates an XML encoding of the and its current state.
An XML encoding of the permission, including any state information.
-
-
-
+ To be added.
@@ -451,22 +376,7 @@ The parameter's version number is not supported.
A permission to combine with the current permission. It must be of the same type as the current permission.
Creates a permission that is the union of the current and the specified permission.
A new permission that represents the of the current and the specified permission.
-
- is a permission that represents all the operations represented by both the current and the specified permission. Any demand that passes either permission passes their union.
-
- The following statements are required to be `true` for all implementations of the Union method. X and Y represent objects that are not a `null` reference (`Nothing` in Visual Basic).
-
-- X.Union(X) returns an object that has the same value as X.
-
-- X.Union(Y) returns an object that has the same value as the object returned by Y.Union(X).
-
-- X.Union(a `null` reference (`Nothing` in Visual Basic)) returns an object that has the same value as X.
-
- ]]>
-
+ To be added.
The parameter is a reference ( in Visual Basic).
diff --git a/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermissionAttribute.xml b/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermissionAttribute.xml
index 80843c310fe..906b1141c46 100644
--- a/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermissionAttribute.xml
+++ b/xml/System.Net.PeerToPeer.Collaboration/PeerCollaborationPermissionAttribute.xml
@@ -43,16 +43,12 @@
Allows security actions for to be applied to code using declarative security. This class cannot be inherited.
- that is used.
-
- The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the corresponding permission class.
-
]]>
@@ -90,14 +86,7 @@
Specifies a value.
Initializes a new instance of the class with the specified .
-
- works with to allow or deny a peer access to the collaboration session.
-
- ]]>
-
+ To be added.
@@ -133,14 +122,7 @@
Creates and returns a new .
A new object.
-
- .
-
- ]]>
-
+ To be added.
When permissions are inherited , must be overridden.
diff --git a/xml/System.Net.PeerToPeer/PnrpPermission.xml b/xml/System.Net.PeerToPeer/PnrpPermission.xml
index 1eff1490e65..542ad4d6fee 100644
--- a/xml/System.Net.PeerToPeer/PnrpPermission.xml
+++ b/xml/System.Net.PeerToPeer/PnrpPermission.xml
@@ -49,17 +49,8 @@
[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]
- The default permissions allow all local and Intranet zone applications to access PNRP services. If the default permissions are not changed, all link-local and site-local applications have access to Peer-to-Peer services, but global (internet) applications have no access.
-
- Instances of this type have two permission states: they either have no access to the resources protected by the permission, or they have unrestricted full access to those resources.
-
]]>
-
-
-
-
- PNRP Namespace Provider API
@@ -93,20 +84,7 @@
One of the values in the enumeration.
Initializes a new instance of the class with the supplied initial permission state.
-
-
-
-
-
-
-
+ To be added.
@@ -141,26 +119,13 @@
Creates and returns an identical copy of the current .
An object with an IPermission interface, whose instance contains a copy of the current instance of .
-
-
-
+ To be added.
The parameter is not a valid element.
-or-
The parameter's version number is not supported.
The parameter is a reference ( in Visual Basic).
-
-
-
- PNRP Namespace Provider API
@@ -197,25 +162,13 @@ The parameter's version number is not supported.
The XML encoding to use to reconstruct the permission.
Reconstructs a security object with a specified state from an XML encoding.
-
-
-
+ To be added.
The parameter is not a valid element.
-or-
The parameter's version number is not supported.
The parameter is a reference ( in Visual Basic).
-
-
-
@@ -253,26 +206,8 @@ The parameter's version number is not supported.
A permission to with the current permission. It must be of the same type as the current permission.
Creates and returns a permission that is the intersection of the current and the specified permission.
A new permission that represents the intersection of the current and the specified permission. This new permission is a reference ( in Visual Basic) if the intersection is empty.
-
- object references that are not a `null` reference (Nothing in Visual Basic).
-
-- X.Intersect(X) returns a value equal to X.
-
-- X.Intersect(Y) returns the same value as Y.Intersect(X).
-
-- X.Intersect(a `null` reference (`Nothing` in Visual Basic)) returns a `null` reference (`Nothing` in Visual Basic).
-
- ]]>
-
+ To be added.
The target parameter is not a reference ( in Visual Basic) and is not an instance of the same class as the current permission.
-
-
-
@@ -311,29 +246,8 @@ The parameter's version number is not supported.
Determines whether the current is a subset of the specified permission.
if the current is a subset of the specified permission; otherwise, .
-
- is a subset of the specified permission if the current permission specifies a set of operations that is wholly contained by the specified permission. For example, a permission that represents access to "*C:\example.txt*" is a subset of a permission that represents access to "*C:\\*". If this method returns `true`, the current permission represents no more access to the protected resource than does the specified permission.
-
-The following statements are required to be `true` for all implementations of the IsSubsetOf method. X, Y, and Z represent objects that are not a `null` reference (`Nothing` in Visual Basic).
-
-- `X.IsSubsetOf(X)` returns `true`.
-
-- `X.IsSubsetOf(Y)` returns the same value as `Y.IsSubsetOf(X)` if and only if X and Y represent the same set of permissions.
-
-- If `X.IsSubsetOf(Y)` and `Y.IsSubsetOf(Z)` both return `true`, `X.IsSubsetOf(Z)` returns `true`.
-
-If X represents an empty object with a permission state of *None*, and Y represents an object that is a `null` reference (`Nothing` in Visual Basic), `X.IsSubsetOf(Y)` returns `true`. If Z is also an empty permission, the compound set operation `X.Union(Z).IsSubsetOf(Y)` also returns `true` because the of two empty permissions is an empty permission.
-
- ]]>
-
+ To be added.
The target parameter is not a reference ( in Visual Basic) and is not an instance of the same class as the current permission.
-
-
-
@@ -372,18 +286,7 @@ If X represents an empty object with a permis
Returns a value specifying whether the current is unrestricted.
if the current permission is unrestricted; otherwise, .
-
-
-
-
-
-
-
+ To be added.
@@ -419,8 +322,6 @@ If X represents an empty object with a permis
Creates an XML encoding of the and its current state.
A object that contains an XML encoding of the permission, including any state information.
To be added.
-
-
@@ -458,27 +359,9 @@ If X represents an empty object with a permis
A permission to combine with the current permission. It must be of the same type as the current permission.
Creates a permission that is the union of the current and the specified permission.
A new permission that represents the of the current and the specified permission.
-
- is a permission that represents all the operations represented by both the current and the specified permission. Any demand that passes either permission passes their union.
-
- The following statements are required to be `true` for all implementations of the Union method. X and Y represent objects that are not a `null` reference (`Nothing` in Visual Basic).
-
-- X.Union(X) returns an object that has the same value as X.
-
-- X.Union(Y) returns an object that has the same value as the object returned by Y.Union(X).
-
-- X.Union(a `null` reference (`Nothing` in Visual Basic)) returns an object that has the same value as X.
-
- ]]>
-
+ To be added.
parameter is invalid.
-
-
-
diff --git a/xml/System.Net.PeerToPeer/PnrpPermissionAttribute.xml b/xml/System.Net.PeerToPeer/PnrpPermissionAttribute.xml
index 126caeac640..6cdcd0a4a32 100644
--- a/xml/System.Net.PeerToPeer/PnrpPermissionAttribute.xml
+++ b/xml/System.Net.PeerToPeer/PnrpPermissionAttribute.xml
@@ -43,16 +43,12 @@
Allows security actions for to be applied to code using declarative security.
- that is used.
-
- The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the corresponding permission class.
-
]]>
@@ -88,14 +84,7 @@
One of the values.
Initializes a new instance of the class with the specified .
-
- works with to allow or deny actions by the peer granted the permission and the permission attribute.
-
- ]]>
-
+ To be added.
@@ -133,11 +122,6 @@
Creates and returns a new .
A new object.
To be added.
-
- This method is not used, and is included only to support inheritance from at compile time or during interpretation.
-
- When this class inherits from , it overrides automatically at compile time or at run-time.
-
diff --git a/xml/System.Net.Security/SslClientAuthenticationOptions.xml b/xml/System.Net.Security/SslClientAuthenticationOptions.xml
index f9fd8b5198e..23464a9152f 100644
--- a/xml/System.Net.Security/SslClientAuthenticationOptions.xml
+++ b/xml/System.Net.Security/SslClientAuthenticationOptions.xml
@@ -46,9 +46,9 @@
and, in .NET 5 and later versions, for .
+ This property bag is used as argument for and .
- The uses this property bag in the property.
+The uses this property bag in the property.
]]>
diff --git a/xml/System.Net.Security/SslStream.xml b/xml/System.Net.Security/SslStream.xml
index 0680cb37634..60ba5de187a 100644
--- a/xml/System.Net.Security/SslStream.xml
+++ b/xml/System.Net.Security/SslStream.xml
@@ -87,15 +87,9 @@
assumes that a timeout along with any other when one is thrown from the inner stream will be treated as fatal by its caller. Reusing a instance after a timeout will return garbage. An application should the and throw an exception in these cases.
- The .NET Framework 4.6 includes a security feature that blocks insecure cipher and hashing algorithms for connections. Applications using TLS/SSL through APIs such as HttpClient, HttpWebRequest, FTPClient, SmtpClient, and SslStream and targeting .NET Framework 4.6 get the more-secure behavior by default.
-
- Developers may want to opt out of this behavior in order to maintain interoperability with their existing SSL3 services OR TLS w/ RC4 services. [This article](https://support.microsoft.com/kb/3069494) explains how to modify your code so that the new behavior is disabled.
-
- The .NET Framework 4.7 adds new overloads for the methods that authenticate SslStreams that do not specify a TLS version, but instead use the TLS version defined as the system default in [SCHANNEL](/windows/win32/secauthn/secure-channel). Use these methods in your app as a way to be able to later modify the defaults as TLS version best practice changes over time, without the need to rebuild and redeploy your app.
-
- Also see [Transport Layer Security (TLS) best practices with the .NET Framework](/dotnet/framework/network-programming/tls).
-
+To opt out of the behavior that blocks insecure cipher and hashing algorithms for connections in order to maintain interoperability with your existing SSL3 services OR TLS w/ RC4 services, see [Cannot connect to a server by using the ServicePointManager or SslStream APIs after upgrade to .NET Framework 4.6](https://support.microsoft.com/kb/3069494).
+Use the overloads for methods that authenticate SslStreams that don't specify a TLS version, but instead use the TLS version defined as the system default in [SCHANNEL](/windows/win32/secauthn/secure-channel), as a way to be able to later modify the defaults, without the need to rebuild and redeploy your app.
## Examples
The following code example demonstrates creating an that uses the class to communicate with clients.
@@ -337,12 +331,10 @@
The use of the Null cipher is required when the encryption policy is set to .
> [!NOTE]
-> .NET caches SSL sessions as they are created and attempts to reuse a cached session for subsequent requests, if possible. When attempting to reuse an SSL session, the Framework uses the first element of the provided during authentication (if there is one), or tries to reuse an anonymous sessions if the certificate collection is empty.
+> .NET caches SSL sessions as they are created and attempts to reuse a cached session for subsequent requests, if possible. When attempting to reuse an SSL session, .NET uses the first element of the provided during authentication (if there is one), or tries to reuse an anonymous session if the certificate collection is empty.
> [!NOTE]
-> Client certificates are not supported in the SSL version 2 protocol.
-
-
+> Client certificates are not supported in the SSL version 2 protocol.
## Examples
The following code example creates an and initiates the client portion of the authentication.
@@ -436,8 +428,7 @@
The use of the Null cipher is required when the encryption policy is set to .
> [!NOTE]
-> .NET caches SSL sessions as they are created and attempts to reuse a cached session for subsequent requests, if possible. When attempting to reuse an SSL session, the Framework uses the first element of the provided during authentication (if there is one), or tries to reuse an anonymous sessions if the certificate collection is empty.
-
+> .NET caches SSL sessions as they are created and attempts to reuse a cached session for subsequent requests, if possible. When attempting to reuse an SSL session, .NET uses the first element of the provided during authentication (if there is one), or tries to reuse an anonymous session if the certificate collection is empty.
## Examples
The following code example demonstrates calling this constructor. This example is part of a larger example provided for the class.
diff --git a/xml/System.Net.Sockets/IPProtectionLevel.xml b/xml/System.Net.Sockets/IPProtectionLevel.xml
index 8ba53f31c65..54cd8866ffe 100644
--- a/xml/System.Net.Sockets/IPProtectionLevel.xml
+++ b/xml/System.Net.Sockets/IPProtectionLevel.xml
@@ -44,18 +44,17 @@
A value that enables restriction of an IPv6 socket to a specified scope, such as addresses with the same link local or site local prefix.
-
- <socket> Element (Network Settings)
diff --git a/xml/System.Net.Sockets/Socket.xml b/xml/System.Net.Sockets/Socket.xml
index 782cc0b2263..bb363683510 100644
--- a/xml/System.Net.Sockets/Socket.xml
+++ b/xml/System.Net.Sockets/Socket.xml
@@ -82,14 +82,6 @@ implementation, this may lead to unintended data interleaving for large or multi
- Network Programming in the .NET Framework
- Best Practices for System.Net Classes
- Cache Management for Network Applications
- Internet Protocol Version 6
- Network Programming Samples
- Network Tracing in the .NET Framework
- Security in Network Programming
- Socket Performance Enhancements in Version 3.5
@@ -127,7 +119,7 @@ implementation, this may lead to unintended data interleaving for large or multi
- The socket handle for the socket that the object will encapsulate.
+ The socket handle for the socket that the object will encapsulate.
Initializes a new instance of the class for the specified socket handle.
instance with data ga
- The socket information returned by .
+ The socket information returned by .
Initializes a new instance of the class using the specified value returned from .
instance with data ga
> If this constructor throws a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> This member outputs trace information when you enable network tracing in your application.
]]>
- The combination of and results in an invalid socket.
+ The combination of and results in an invalid socket.
@@ -309,12 +301,10 @@ This method populates the instance with data ga
The `addressFamily` parameter specifies the addressing scheme that the class uses, the `socketType` parameter specifies the type of the class, and the `protocolType` parameter specifies the protocol used by . The three parameters are not independent. Some address families restrict which protocols can be used with them, and often the type is implicit in the protocol. If the combination of address family, type, and protocol type results in an invalid , this constructor throws a .
> [!NOTE]
-> If this constructor throws a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+> If this constructor throws a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
+> This member outputs trace information when you enable network tracing in your application.
## Examples
The following code example demonstrates how to create an instance of the class.
@@ -324,7 +314,7 @@ This method populates the instance with data ga
]]>
- The combination of , , and results in an invalid socket.
+ The combination of , , and results in an invalid socket.
@@ -383,12 +373,10 @@ This method populates the instance with data ga
If you call this method using a non-blocking , and no connection requests are queued, throws a . If you receive a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
> [!NOTE]
-> Before calling the method, you must first call the method to listen for and queue incoming connection requests.
+> Before calling the method, you must first call the method to listen for and queue incoming connection requests.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
+> This member outputs trace information when you enable network tracing in your application.
## Examples
The following code example accepts a simple connection.
@@ -399,8 +387,8 @@ This method populates the instance with data ga
]]>
An error occurred when attempting to access the socket.
- The has been closed.
- The accepting socket is not listening for connections. You must call and before calling .
+ The has been closed.
+ The accepting socket is not listening for connections. You must call and before calling .
@@ -438,7 +426,7 @@ This method populates the instance with data ga
You must call the and method before calling the method.
An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
@@ -475,7 +463,7 @@ This method populates the instance with data ga
- The socket to use for accepting the connection.
+ The socket to use for accepting the connection.
Accepts an incoming connection.
An asynchronous task that completes with the accepted Socket.
To be added.
@@ -483,7 +471,7 @@ This method populates the instance with data ga
You must call the and method before calling the method.
An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
@@ -526,7 +514,7 @@ This method populates the instance with data ga
- The object to use for this asynchronous socket operation.
+ The object to use for this asynchronous socket operation.
Begins an asynchronous operation to accept an incoming connection attempt.
if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation.
@@ -542,7 +530,7 @@ This method populates the instance with data ga
The following properties and events on the object are required:
--
+-
The caller can optionally specify an existing to use for the incoming connection by specifying the to use with the property.
@@ -568,7 +556,7 @@ This method populates the instance with data ga
This exception also occurs if the socket is already connected or a socket operation was already in progress using the specified parameter.
An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
@@ -618,8 +606,8 @@ This method populates the instance with data ga
You must call the and method before calling the method.
An error occurred when attempting to access the socket.
- The has been closed.
- The cancellation token was canceled. This exception is stored into the returned task.
+ The has been closed.
+ The cancellation token was canceled. This exception is stored into the returned task.
@@ -656,7 +644,7 @@ This method populates the instance with data ga
- The socket to use for accepting the connection.
+ The socket to use for accepting the connection.
A cancellation token that can be used to cancel the asynchronous operation.
Accepts an incoming connection.
An asynchronous task that completes with the accepted Socket.
@@ -665,8 +653,8 @@ This method populates the instance with data ga
You must call the and method before calling the method.
An error occurred when attempting to access the socket.
- The has been closed.
- The cancellation token was canceled. This exception is stored into the returned task.
+ The has been closed.
+ The cancellation token was canceled. This exception is stored into the returned task.
@@ -767,7 +755,7 @@ This method populates the instance with data ga
Gets the amount of data that has been received from the network and is available to be read.
- The number of bytes of data received from the network and available to be read.
+ The number of bytes of data received from the network and available to be read.
instance with data ga
If the remote host shuts down or closes the connection, can throw a . If you receive a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
+> This member outputs trace information when you enable network tracing in your application.
## Examples
The following code example compares the results of calling IOControl with FIONREAD and the Available property.
@@ -789,7 +775,7 @@ This method populates the instance with data ga
]]>
An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
@@ -853,7 +839,7 @@ This method populates the instance with data ga
- The delegate.
+ The delegate.
An object that contains state information for this request.
Begins an asynchronous operation to accept an incoming connection attempt.
An that references the asynchronous creation.
@@ -873,33 +859,30 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> You can use the property of the returned to identify the remote host's network address and port number.
+> You can use the property of the returned to identify the remote host's network address and port number.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> This member outputs trace information when you enable network tracing in your application.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
]]>
- The object has been closed.
- The accepting socket is not listening for connections. You must call and before calling .
+ The object has been closed.
+ The accepting socket is not listening for connections. You must call and before calling .
-or-
The accepted socket is bound.
- .NET Framework only: An error occurred when attempting to access the socket.
- Asynchronous Client Socket Example
- Asynchronous Server Socket Example
@@ -950,8 +933,8 @@ This method populates the instance with data ga
- The number of bytes to accept from the sender.
- The delegate.
+ The number of bytes to accept from the sender.
+ The delegate.
An object that contains state information for this request.
Begins an asynchronous operation to accept an incoming connection attempt and receives the first block of data sent by the client application.
An that references the asynchronous creation.
@@ -971,35 +954,32 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> You can use the property of the returned to identify the remote host's network address and port number.
+> You can use the property of the returned to identify the remote host's network address and port number.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
- The object has been closed.
- The accepting socket is not listening for connections. You must call and before calling .
+ The object has been closed.
+ The accepting socket is not listening for connections. You must call and before calling .
-or-
The accepted socket is bound.
is less than 0.
- .NET Framework only: An error occurred when attempting to access the socket.
- Asynchronous Client Socket Example
- Asynchronous Server Socket Example
@@ -1051,9 +1031,9 @@ This method populates the instance with data ga
- The accepted object. This value may be .
- The maximum number of bytes to receive.
- The delegate.
+ The accepted object. This value may be .
+ The maximum number of bytes to receive.
+ The delegate.
An object that contains state information for this request.
Begins an asynchronous operation to accept an incoming connection attempt from a specified socket and receives the first block of data sent by the client application.
An object that references the asynchronous object creation.
@@ -1073,35 +1053,32 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> You can use the property of the returned to identify the remote host's network address and port number.
+> You can use the property of the returned to identify the remote host's network address and port number.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
- The object has been closed.
- The accepting socket is not listening for connections. You must call and before calling .
+ The object has been closed.
+ The accepting socket is not listening for connections. You must call and before calling .
-or-
The accepted socket is bound.
is less than 0.
- .NET Framework only: An error occurred when attempting to access the socket.
- Asynchronous Client Socket Example
- Asynchronous Server Socket Example
@@ -1172,7 +1149,7 @@ This method populates the instance with data ga
An that represents the remote host.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Begins an asynchronous request for a remote host connection.
An that references the asynchronous connection.
@@ -1192,25 +1169,24 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> You can use the property of the returned to identify the remote host's network address and port number.
+> You can use the property of the returned to identify the remote host's network address and port number.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
A caller higher in the call stack does not have permission for the requested operation.
- The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
+ The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
@@ -1277,8 +1253,8 @@ This method populates the instance with data ga
- The of the remote host.
- The port number of the remote host.
+ The of the remote host.
+ The port number of the remote host.
An delegate that references the method to invoke when the connect operation is complete.
A user-defined object that contains information about the connect operation. This object is passed to the delegate when the operation is complete.
Begins an asynchronous request for a remote host connection. The host is specified by an and a port number.
@@ -1303,27 +1279,26 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> If this socket has previously been disconnected, then must be called on a thread that will not exit until the operation is complete. This is a limitation of the underlying provider.
+> If this socket has previously been disconnected, then must be called on a thread that will not exit until the operation is complete. This is a limitation of the underlying provider.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
- The has been closed.
- The is not in the socket family.
- The port number is not valid.
- The length of is zero.
- The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
+ The has been closed.
+ The is not in the socket family.
+ The port number is not valid.
+ The length of is zero.
+ The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
@@ -1391,7 +1366,7 @@ This method populates the instance with data ga
At least one , designating the remote host.
- The port number of the remote host.
+ The port number of the remote host.
An delegate that references the method to invoke when the connect operation is complete.
A user-defined object that contains information about the connect operation. This object is passed to the delegate when the operation is complete.
Begins an asynchronous request for a remote host connection. The host is specified by an array and a port number.
@@ -1416,27 +1391,26 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> If this socket has previously been disconnected, then must be called on a thread that will not exit until the operation is complete. This is a limitation of the underlying provider.
+> If this socket has previously been disconnected, then must be called on a thread that will not exit until the operation is complete. This is a limitation of the underlying provider.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
This method is valid for sockets that use or .
- The port number is not valid.
- The length of is zero.
- The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
+ The port number is not valid.
+ The length of is zero.
+ The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
@@ -1503,8 +1477,8 @@ This method populates the instance with data ga
- The name of the remote host.
- The port number of the remote host.
+ The name of the remote host.
+ The port number of the remote host.
An delegate that references the method to invoke when the connect operation is complete.
A user-defined object that contains information about the connect operation. This object is passed to the delegate when the operation is complete.
Begins an asynchronous request for a remote host connection. The host is specified by a host name and a port number.
@@ -1529,25 +1503,25 @@ This method populates the instance with data ga
To cancel a pending call to the method, close the . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> If this socket has previously been disconnected, then must be called on a thread that will not exit until the operation is complete. This is a limitation of the underlying provider.
+> If this socket has previously been disconnected, then must be called on a thread that will not exit until the operation is complete. This is a limitation of the underlying provider.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- The has been closed.
+ The has been closed.
This method is valid for sockets in the or families.
- The port number is not valid.
- The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
+ The port number is not valid.
+ The has been placed in a listening state by calling , or an asynchronous operation is already in progress.
@@ -1607,7 +1581,7 @@ This method populates the instance with data ga
if this socket can be reused after the connection is closed; otherwise, .
- The delegate.
+ The delegate.
An object that contains state information for this request.
Begins an asynchronous request to disconnect from a remote endpoint.
An object that references the asynchronous operation.
@@ -1625,15 +1599,14 @@ This method populates the instance with data ga
The operation must be completed by calling the method. Typically, the method is invoked by the provided delegate. will block the calling thread until the operation is completed.
> [!NOTE]
-> If you receive a exception, use the property to obtain the specific error code.
+> If you receive a exception, use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> This member outputs trace information when you enable network tracing in your application.
]]>
- The object has been closed.
- .NET Framework only: An error occurred when attempting to access the socket.
+ The object has been closed.
@@ -1722,25 +1695,24 @@ This method populates the instance with data ga
Close the to cancel a pending . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
has been closed.
@@ -1824,25 +1796,24 @@ This method populates the instance with data ga
Close the to cancel a pending . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
has been closed.
@@ -1915,8 +1886,8 @@ This method populates the instance with data ga
An array of type that is the storage location for the received data.
- The zero-based position in the parameter at which to store the received data.
- The number of bytes to receive.
+ The zero-based position in the parameter at which to store the received data.
+ The number of bytes to receive.
A bitwise combination of the values.
An delegate that references the method to invoke when the operation is complete.
A user-defined object that contains information about the receive operation. This object is passed to the delegate when the operation is complete.
@@ -1936,25 +1907,24 @@ This method populates the instance with data ga
Close the to cancel a pending . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
has been closed.
@@ -2034,8 +2004,8 @@ This method populates the instance with data ga
An array of type that is the storage location for the received data.
- The location in to store the received data.
- The number of bytes to receive.
+ The location in to store the received data.
+ The number of bytes to receive.
A bitwise combination of the values.
A object that stores the socket error.
An delegate that references the method to invoke when the operation is complete.
@@ -2056,25 +2026,24 @@ This method populates the instance with data ga
Close the to cancel a pending . When the method is called while an asynchronous operation is in progress, the callback provided to the method is called. A subsequent call to the method will throw an (before .NET 7) or a (on .NET 7+) to indicate that the operation has been cancelled.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket.
has been closed.
@@ -2162,11 +2131,11 @@ This method populates the instance with data ga
An array of type that is the storage location for the received data.
- The zero-based position in the parameter at which to store the data.
- The number of bytes to receive.
+ The zero-based position in the parameter at which to store the data.
+ The number of bytes to receive.
A bitwise combination of the values.
A reference to an of the same type as the endpoint of the remote host to be updated on synchronous receive.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Begins to asynchronously receive data from a specified network device.
An that references the asynchronous read.
@@ -2194,13 +2163,13 @@ This method populates the instance with data ga
To cancel a pending , call the method.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
@@ -2210,7 +2179,6 @@ This method populates the instance with data ga
-or-
is .
- .NET Framework only: An error occurred when attempting to access the socket.
is less than 0.
@@ -2225,7 +2193,7 @@ This method populates the instance with data ga
-or-
is greater than the length of minus the value of the parameter.
- The has been closed.
+ The has been closed.
A caller higher in the call stack does not have permission for the requested operation.
@@ -2296,11 +2264,11 @@ This method populates the instance with data ga
An array of type that is the storage location for the received data.
- The zero-based position in the parameter at which to store the data.
- The number of bytes to receive.
+ The zero-based position in the parameter at which to store the data.
+ The number of bytes to receive.
A bitwise combination of the values.
A reference to an of the same type as the endpoint of the remote host to be updated on synchronous receive.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Begins to asynchronously receive the specified number of bytes of data into the specified location of the data buffer, using the specified , and stores the endpoint and packet information.
An that references the asynchronous read.
@@ -2320,13 +2288,13 @@ This method populates the instance with data ga
This method reads data into the `buffer` parameter, and captures the remote host endpoint from which the data is sent, as well as information about the received packet. For information on how to retrieve this endpoint, refer to . This method is most useful if you intend to asynchronously receive connectionless datagrams from an unknown host or multiple hosts.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
@@ -2336,7 +2304,6 @@ This method populates the instance with data ga
-or-
is .
- .NET Framework only: An error occurred when attempting to access the socket.
is less than 0.
@@ -2351,7 +2318,7 @@ This method populates the instance with data ga
-or-
is greater than the length of minus the value of the parameter.
- The has been closed.
+ The has been closed.
@@ -2422,7 +2389,7 @@ This method populates the instance with data ga
An array of type that contains the data to send.
A bitwise combination of the values.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Sends data asynchronously to a connected .
An that references the asynchronous send.
@@ -2442,22 +2409,22 @@ This method populates the instance with data ga
If you specify the flag as the `socketflags` parameter, the data you are sending will not be routed.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
+> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
@@ -2465,8 +2432,7 @@ This method populates the instance with data ga
is .
is empty.
- .NET Framework only: An error occurred when attempting to access the socket. See remarks section below.
- The has been closed.
+ The has been closed.
@@ -2529,7 +2495,7 @@ This method populates the instance with data ga
An array of type that contains the data to send.
A bitwise combination of the values.
A object that stores the socket error.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Sends data asynchronously to a connected .
An that references the asynchronous send.
@@ -2549,22 +2515,22 @@ This method populates the instance with data ga
If you specify the flag as the `socketflags` parameter, the data you are sending will not be routed.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
+> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
@@ -2572,8 +2538,7 @@ This method populates the instance with data ga
is .
is empty.
- .NET Framework only: An error occurred when attempting to access the socket. See remarks section below.
- The has been closed.
+ The has been closed.
@@ -2643,10 +2608,10 @@ This method populates the instance with data ga
An array of type that contains the data to send.
- The zero-based position in the parameter at which to begin sending data.
- The number of bytes to send.
+ The zero-based position in the parameter at which to begin sending data.
+ The number of bytes to send.
A bitwise combination of the values.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Sends data asynchronously to a connected .
An that references the asynchronous send.
@@ -2666,28 +2631,27 @@ This method populates the instance with data ga
If you specify the flag as the `socketflags` parameter, the data you are sending will not be routed.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
+> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket. See remarks section below.
is less than 0.
@@ -2702,7 +2666,7 @@ This method populates the instance with data ga
-or-
is greater than the length of minus the value of the parameter.
- The has been closed.
+ The has been closed.
@@ -2765,11 +2729,11 @@ This method populates the instance with data ga
An array of type that contains the data to send.
- The zero-based position in the parameter at which to begin sending data.
- The number of bytes to send.
+ The zero-based position in the parameter at which to begin sending data.
+ The number of bytes to send.
A bitwise combination of the values.
A object that stores the socket error.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Sends data asynchronously to a connected .
An that references the asynchronous send.
@@ -2789,28 +2753,27 @@ This method populates the instance with data ga
If you specify the flag as the `socketflags` parameter, the data you are sending will not be routed.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code.
+> If you receive a , use the property to obtain the specific error code.
> [!NOTE]
-> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
+> All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
> [!NOTE]
-> `state` is an instantiation of a user-defined class.
+> `state` is an instantiation of a user-defined class.
> [!NOTE]
-> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
+> The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
is .
- .NET Framework only: An error occurred when attempting to access the socket. See remarks section below.
is less than 0.
@@ -2825,7 +2788,7 @@ This method populates the instance with data ga
-or-
is greater than the length of minus the value of the parameter.
- The has been closed.
+ The has been closed.
@@ -2894,7 +2857,7 @@ This method populates the instance with data ga
A string that contains the path and name of the file to send. This parameter can be .
- The delegate.
+ The delegate.
An object that contains state information for this request.
Sends the file to a connected object using the flag.
An object that represents the asynchronous send.
@@ -2914,20 +2877,16 @@ This method populates the instance with data ga
Although intended for connection-oriented protocols, also works for connectionless protocols, provided that you first call the or method to establish a default remote host. With connectionless protocols, you must be sure that the size of your file does not exceed the maximum packet size of the underlying service provider. If it does, the datagram is not sent and throws a exception.
> [!NOTE]
-> If you receive a exception, use the property to obtain the specific error code.
+> If you receive a exception, use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
]]>
- The object has been closed.
- The socket is not connected to a remote host.
- The file was not found.
- .NET Framework only: An error occurred when attempting to access the socket. See remarks section below.
+ The object has been closed.
+ The socket is not connected to a remote host.
+ The file was not found.
@@ -2982,8 +2941,8 @@ This method populates the instance with data ga
A string that contains the path and name of the file to be sent. This parameter can be .
- The data to be sent before the file is sent. This parameter can be .
- The data to be sent after the file is sent. This parameter can be .
+ The data to be sent before the file is sent. This parameter can be .
+ The data to be sent after the file is sent. This parameter can be .
A bitwise combination of the enumeration values.
An delegate to be invoked when this operation completes. This parameter can be .
A user-defined object that contains state information for this request. This parameter can be .
@@ -3007,24 +2966,23 @@ This method populates the instance with data ga
Although intended for connection-oriented protocols, also works for connectionless protocols, provided that you first call the or method to establish a default remote host. With connectionless protocols, you must be sure that the size of your file does not exceed the maximum packet size of the underlying service provider. If it does, the datagram is not sent and throws a exception.
> [!NOTE]
-> If you receive a exception, use the property to obtain the specific error code.
+> If you receive a exception, use the property to obtain the specific error code.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
- The object has been closed.
- .NET Framework only: An error occurred when attempting to access the socket. See remarks section below.
- The operating system is not Windows NT or later.
+ The object has been closed.
+ The operating system is not Windows NT or later.
-or-
The socket is not connected to a remote host.
- The file was not found.
+ The file was not found.
@@ -3089,11 +3047,11 @@ This method populates the instance with data ga
An array of type that contains the data to send.
- The zero-based position in at which to begin sending data.
- The number of bytes to send.
+ The zero-based position in at which to begin sending data.
+ The number of bytes to send.
A bitwise combination of the values.
An that represents the remote device.
- The delegate.
+ The delegate.
An object that contains state information for this request.
Sends data asynchronously to a specific remote host.
An that references the asynchronous send.
@@ -3117,13 +3075,13 @@ This method populates the instance with data ga
If you specify the flag as the `socketflags` parameter, the data you are sending will not be routed.
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+> If you receive a , use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
> [!NOTE]
-> The execution context (the security context, the impersonated user, and the calling context) is cached for the asynchronous methods. After the first use of a particular context (a specific asynchronous method, a specific instance, and a specific callback), subsequent uses of that context will see a performance improvement.
+> This member outputs trace information when you enable network tracing in your application.
]]>
@@ -3133,7 +3091,6 @@ This method populates the instance with data ga
-or-
is .
- .NET Framework only: An error occurred when attempting to access the socket.
is less than 0.
@@ -3148,7 +3105,7 @@ This method populates the instance with data ga
-or-
is greater than the length of minus the value of the parameter.
- The has been closed.
+ The has been closed.
A caller higher in the call stack does not have permission for the requested operation.
@@ -3200,7 +3157,7 @@ This method populates the instance with data ga
- The local to associate with the .
+ The local to associate with the .
Associates a with a local endpoint.
instance with data ga
If a UDP socket wants to receive interface information on received packets, the method should be explicitly called with the socket option set to immediately after calling the method.
> [!NOTE]
-> If you intend to receive multicast datagrams, you must call the method with a multicast port number.
+> If you intend to receive multicast datagrams, you must call the method with a multicast port number.
> [!NOTE]
-> You must call the method if you intend to receive connectionless datagrams using the method.
+> You must call the method if you intend to receive connectionless datagrams using the method.
> [!NOTE]
-> If you receive a when calling the method, use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+> If you receive a when calling the method, use the property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
+> This member outputs trace information when you enable network tracing in your application.
## Examples
The following code example binds a using the specified local endpoint.
@@ -3239,7 +3194,7 @@ This method populates the instance with data ga
is .
An error occurred when attempting to access the socket.
- The has been closed.
+ The has been closed.
A caller higher in the call stack does not have permission for the requested operation.
@@ -3298,15 +3253,15 @@ This method populates the instance with data ga
If you are in blocking mode, and you make a method call that does not complete immediately, your application will block execution until the requested operation completes. If you want execution to continue even though the requested operation is not complete, change the property to `false`. The property has no effect on asynchronous methods. If you are sending and receiving data asynchronously and want to block execution, use the