K
K
Kirill Frolov2020-04-29 10:07:30
C++ / C#
Kirill Frolov, 2020-04-29 10:07:30

Error when starting Telegram bot. What is the problem?

I'm trying to write a telegram bot. When calling the
var me = await bot.GetMeAsync();
I get the error:
System.Net.Http.HttpRequestException
HResult=0x80131620
Message=The SSL connection could not be established, see inner exception.
Source=System.Net.Http
Inner Exception 1:
IOException: Unable to read data from the transport connection: The remote host forcibly terminated the existing connection.

Inner Exception 2:
SocketException: The remote host forcibly terminated the existing connection.

Bot instance creation:
bot = new TelegramBotClient(token);

What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
leftyy, 2020-04-29
@f_kirill

Try using vpn, had the same problem, it helped

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question