-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
dotnet/dotnet-api-docs
#4731Labels
area-System.Net.HttpdocumentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test code
Milestone
Description
A typical way to obtain the server certificate after making a request via HttpClient is to use ServicePointManager.FindServicePoint with the URI and grab the Certificate property off of that.
This works fine in .NET 4.5, as evidenced by this fragment from a workbook:
However, in a .NET Core application, this doesn't work:
You can also see the attached project in certificate-test.zip. It contains a sample you can download and dotnet run.
dotnet --info output:
.NET Command Line Tools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Net.HttpdocumentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test code

