jgauffin / griffin.networking

Networking library for .NET
http://blog.gauffin.org/2012/05/griffin-networking-a-somewhat-performant-networking-library-for-net/
GNU Lesser General Public License v3.0
108 stars 35 forks source link

How to make a https request with pure griffin networking? #29

Open henon opened 7 years ago

henon commented 7 years ago

@jgauffin: I noticed that no matter what I do, a .NET webrequest to a Griffin.Webserver HTTPS port will time out. WebClient, HttpWebRequest, etc all behave the same. All the solutions I found out there are not helping here. It is important to mention that Browsers like Firefox are able to connect to the same port normally.

So I'd like to use pure griffin.networking to open an SSL connection to the HTTPS port hoping that this will not time out but I've not been able to figure out how. Can you quickly throw together a code sample?

Thank you very much!

henon commented 7 years ago

This problem is fixed now that framework 4.5 supports modern TLS. By changing default settings I can talk to Griffin.Webserver HTTPS port without timeout!

Here is the working default setting:

        System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; // comparable to modern browsers

PS: that means I don't need what I requested above. Thanks.