I'm sending out a basic request to a 3rd party web service, but it always times out on machines with .net v4.0 installed. (timeout exception: "The operation has timed out")
It works fine if 4.5 is installed but we need to support 4.0
The service host has disabled support for SSL3 protocol so the following will not work for me.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
the code for sending the request is basic
var request = ((HttpWebRequest)WebRequest.Create("https://hostname.com"));
var response = (HttpWebResponse)request.GetResponse(); //timeout here
This also does not help as it never reaches this point
ServicePointManager.ServerCertificateValidationCallback = (sender,certificate,chain,sslPolicyErrors)=> true;
The 3rd party web service works fine if I just navigate to it using a web browser.
Extending the timeout values will obviously not work in this case as the 3rd party sever never actually returns a response.
What can I do to resolve this issue?
update: the issue was occurring on win7 and win server 2003 machines. Another test was done on an XP machine with .NETv4.0. the test passed and a response was received. So .NETv4.0 may not be the problem here. (but the upgrade to 4.5 did resolve the issue previously.)
The issue must be environmental. What can I do to troubleshoot this issue?