Hi all, I’ve been using Let’s Encrypt for over a year on my A2 hosting Windows shared server. I also use the twitter api to get a timeline. This stopped working a few days ago. Twitter announced this:
“Beginning July 25th 2019 , all connections to the Twitter API (and all other Twitter domains) will require TLS 1.2”
I contacted A2 and they say that my Let’s Encrypt certificate supports TLS 1.2. So … any idea what could be the problem here?
Thanks so much, I’m like a fish out of water on this topic. OK, will follow up with A2 (though they use asp.net 2.7 which I thought was TLS 1.2 by default), and will also try the twitter community in case someone there has had a similar issue. Could be my code, but I have no idea what I would need to change! I just do a Get request on the twitter REST API…
I would agree with @JuergenAuer: if you’re using the Twitter API then the problem is most probably with the programming environment that you use to consume the Twitter API, not with anything about your site.
Thanks everyone! Problem has been solved. I had to change several things, hope this helps someone else!
A2 hosting pointed out that my web.config file was wrong. In my compilation tag I pointed to 4.0. Changed it to this:
Also, my httpRuntime did not specify any target, I added the target like so:
(the rest of the stuff was already there and is not needed for this problem, only targetFramework is relevant)
As per JuergenAuer, in my Global.asax I added this:
protected void Application_Start()
{
if (System.Net.ServicePointManager.SecurityProtocol.HasFlag(System.Net.SecurityProtocolType.Tls12) == false)
{
System.Net.ServicePointManager.SecurityProtocol = System.Net.ServicePointManager.SecurityProtocol | System.Net.SecurityProtocolType.Tls12;
}
}
Note: in Visual Studio, intellisense did not recognize the Tls12 enum value. To fix that, right click the project, Property Pages, Build: set the target framework to 4.6 (mine was set to 4.0 - it’s an old project!!)