We’ve been very satisfied users of your excellent package for quite some time. Thank you very much!
Since Twitter started blocking SSL3, we are seeing two kinds of exceptions roughly once every 500 API calls:
LinqToTwitter.TwitterQueryException: Could not authenticate you - Please visit the LINQ to Twitter FAQ (at the HelpLink) for help on resolving this error.
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
If the SAME credentials are used after 10 minutes or so, then the problem usually goes away, and the API call to Twitter is completed successfully. This is not really an issue of authentication. If we retry the request after 1 min, it usually fails again.
The problem occurs mostly with posting, but occurs in other API calls as well.
We have added the following lines of code to try and force TLS, but the problem still occurs from time to time:
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
ServicePointManager.MaxServicePointIdleTime = 5 * 1000;
Any help would be much appreciated.