3

I have a trouble:

ASP.NET 4.0 has the class System.Net.ServicePointManager, but I can't find it in .NET core.

How to find it?

J-Alex
  • 6,881
  • 10
  • 46
  • 64
Kan Hing
  • 31
  • 1
  • 3
  • I can't find the class "ServicePointManager" in namespace "System.Net" – Kan Hing Jan 24 '17 at 01:41
  • What do you need it for? There may be an alternate solution. – Nate Barbettini Jan 24 '17 at 01:43
  • I want to tell a client request not to care about the remote servers self created SSL cert. In .net 4.0 I'm able to do this by manipulating the System.Net.ServicePointManager. How can I do the same in .net core? – Kan Hing Jan 24 '17 at 02:00
  • My core: `ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult); private static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; //allways true }` – Kan Hing Jan 24 '17 at 02:02
  • 4
    Possible duplicate of [bypass invalid SSL certificate in .net core](http://stackoverflow.com/questions/38138952/bypass-invalid-ssl-certificate-in-net-core) – Adrian Sanguineti Jan 24 '17 at 02:19

1 Answers1

0

it looks like it is currently not supported. For more information, please take a look at here

Currently, there is no way to control connection level properties for TCP connections in the .NET Core stack except for some small properties on HttpClientHandler like MaxConnectionsPerServer.

EDIT: from the blog post on ASP.NET Core 2.0 Features

The Kestrel web server has new features that make it more suitable as an Internet-facing server. We’ve added a number of server constraint configuration options in the KestrelServerOptions class’s new Limits property. You can now add limits for the following:

  1. Maximum client connections
  2. Maximum request body size
  3. Minimum request body data rate
fer
  • 11
  • 3