Application I wrote is having trouble "creating a SSL/TLS channel" to a server but browsers on the same machine are not having any problems with the website.
To troubleshoot this, I'd created the following "dumbed down" code to test for this very specific issue.
try {
var myRequest = (HttpWebRequest)WebRequest.Create(url);
var response = (HttpWebResponse)myRequest.GetResponse();
if (response.StatusCode == HttpStatusCode.OK) {
Console.Write(string.Format("{0} Available", url));
} else {
Console.Write(string.Format("{0} Returned, but with status: {1}", url, response.StatusDescription));
}
} catch (Exception ex) {
Console.Write(string.Format("{0} unavailable: {1}", url, ex.Message));
}
This is still giving me a "Could not create SSL/TLS channel" exception. A wireshark analysis of both of these scenarios shows that the browsers Client Hello packet contains 20 cipher suites, while the application's Client Hello only has 4. I'm thinking this could be the problem but am not sure how it is happening or how to stop it from happening.
To confound it more, this code works from another machine just fine.