We have a .Net 4 application which makes an https request to a third party server running Lotus-Domino. We are using the System.Net.WebRequest to make the request. When ServicePointManager.SecurityProtocol is set to the default, i.e. Tls | Ssl3, then the request fails. Specifically WebRequest.GetResponse throws the exception: WebException: "The request was aborted: Could not create SSL/TLS secure channel."
The code is as simple as this:
WebRequest request = WebRequest.Create("https://SOMEURLHERE");
using (HttpWebResponse response = (HttpWebResponse) request.GetResponse())
{
using (StreamReader responseReader = new StreamReader(response.GetResponseStream()))
{
string responseTest = responseReader.ReadToEnd();
}
}
Changing ServicePointManager.SecurityProtocol to Ssl3 allows the request to succeed. Using this as a fix presents some challenges. ServicePointManager.SecurityProtocol is static therefore changing it will change all requests in the application. This is something we don't want to do. Changing it and then resetting it back to the default after the request is undesirable because our application makes http requests from multiple treads, introducing a lock would effectively force us to run single threaded for the duration of a possibly lengthy web service call.
The third party Lotus-Domino server can't support TLS.
I have looked at the requests/responses in Wireshark however I not familiar with the protocols therefore I can't see anything meaningful, for me.
Not validating the certificate does not fix the problem, e.g. ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
I do see this response from the server: "SSLv3 Record Layer: Alert (Level: Fatal, Description: Close Notify)"
- Is there a way we can do can set the SecurityProtocol to Ssl3 for a single request?
- Is the something else we can do when SecurityProtocol = Tls | Ssl3 to allow the request work?
- Is there something I could tell our third party, running a Lotus-Domino server to perhaps address the connectivity issue on their side.