Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/fundamentals/syslib-diagnostics/syslib0014.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ The following APIs are marked as obsolete, starting in .NET 6. Using them in cod
- <xref:System.Net.WebRequest.CreateHttp%2A?displayProperty=fullName>
- <xref:System.Net.WebRequest.CreateDefault(System.Uri)?displayProperty=fullName>
- <xref:System.Net.HttpWebRequest.%23ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)>
- <xref:System.Net.ServicePointManager.FindServicePoint%2A?displayProperty=fullName>
- <xref:System.Net.ServicePointManager>
- <xref:System.Net.WebClient.%23ctor>

To reduce the number of analyzer warnings, the <xref:System.Net.ServicePoint> class is not marked as obsolete, but all ways of obtaining its instances are.

Settings on <xref:System.Net.ServicePointManager> and <xref:System.Net.ServicePoint> no longer affect <xref:System.Net.Security.SslStream> or <xref:System.Net.Http.HttpClient>.

## Workarounds

Use <xref:System.Net.Http.HttpClient> instead.

See the [HttpWebRequest to HttpClient migration guide](https://learn.microsoft.com/dotnet/fundamentals/networking/http/httpclient-migrate-from-httpwebrequest) for more info.

## Suppress a warning

If you must use the obsolete APIs, you can suppress the warning in code or in your project file.
Expand Down
Loading