-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error The request was canceled: A secure channel for SSL / TLS could not be created on create new TelegramBotClient #867
Comments
@Ayanami251379 i have some problem but im on production, Maybe anyone can help? |
The same problem reproduces for old library version (14.10.0). Our bot isn't working. |
same issue. any updates? |
Well same here. but my application works just fine around 18 hours ago with old library version (13.x.x). |
@bukanfarid Me 2, My bot works fine about 12Hrs ago I've used V14.x.x |
I have some issue, that appeared this morning |
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; before : this is working for me |
Thanks for your reply @Chrislie7 , i tried it and it working like a charm! 👍 |
I can confirm this is working for me as well, thank you @Chrislie7 |
So, the problem is due to Telegram disabling everything older than TLS v1.2 (which is not used as the default in .NET Framework 4.5). The best way to mitigate this problem is to update to .NET Framework 4.6-4.8 or even to .NET Core 3.1 (this is preferrable if you can do that). If you can't upgrade your system or .NET Framework to a newer one there might be a solution. One of the members in our group came up with a guide how it can be mitigated:
|
My thanks to both @Chrislie7 and @tuscen . The solution provided works for .NET Framework 4.5.1 |
This is not working for me, even forcing Tls12 as you can see here Forced Tls12 and tried to enable all of them ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls13; Created my own httpClient to pass to the bot, nothing works. Continuously getting this error since Even tried creating my own httpClient to pass to it including handler with Customer validation callback set to always true just to see if that would do anything (pretty sure it wouldn't have but ruling it out)
|
Additionally to what @amoamare said, these are the only ciphers that are currently (2020/02/07) usable for TLS1.2 for the API (Viewable on the SSL Labs site):
For those on Windows Server 2012 R2, forget trying to find the first three since they are only available from Windows Server 2016 onwards. Additionally, the error message that I got was different than the one reported here, but all had to do with TLS configurations. Adding it here for the searches and knowledge.
|
Hi, i have solved this problem, setting my dns to google 8.8.8.8 and 8.8.4.4
Sorry for my english ) |
Set dns names to 8.8.8.8 - all works!!! |
I have finally solved this awful problem by updating windows. Believe me, adding some code or forcing tls 1.2 do not work. The only reason for this is your operating system lack some basic libraries or something like to support the communication with telegram interface. |
Duplicate of #868 |
I have a question or need help
Please DO NOT post it! We don't provide support in GitHub issues any more.
We would be happy if you join our group chat on Telegram
and ask the community to help.
The text was updated successfully, but these errors were encountered: