You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon
For my project I am using the Telegram.Bot v.19.0.0 library, doing some research and testing.
I took the example Telegram.Bot.Examples.WebHook as a basis.
I configured the IIS server so that it is always active, configured certificates and everything necessary. The bot started working and receiving messages.
And everything seems to be in order!
The bot receives messages throughout the day, but constantly stops receiving messages.
Sometimes after 2 hours, sometimes after 12 hours, different all the time.
If I stop the server and start it again, the bot starts receiving messages again
Recently he received messages for almost 24 hours, but he stopped receiving messages again.
What could be the reason for these stops specifically when receiving messages?
I followed all the recommendations to configure the IIS server, my test application
guaranteed to work, the bot sends a message every hour and never stops sending,
but receiving messages systematically stops
The text was updated successfully, but these errors were encountered:
Periodically IIS puts all running applications to sleep and the method StopAsync from ConfigureWebhook is triggered.
Change the method like this and everything should be fine :)
public async Task StopAsync(CancellationToken cancellationToken)
{
/*
using var scope = _serviceProvider.CreateScope();
var botClient = scope.ServiceProvider.GetRequiredService<ITelegramBotClient>();
// Remove webhook on app shutdown
_logger.LogInformation("Removing webhook");
await botClient.DeleteWebhookAsync(cancellationToken: cancellationToken);
*/
}
But remember that the webhook for this bot will exist until you stop it or start a new one with a different URL
Good afternoon
For my project I am using the Telegram.Bot v.19.0.0 library, doing some research and testing.
I took the example Telegram.Bot.Examples.WebHook as a basis.
I configured the IIS server so that it is always active, configured certificates and everything necessary. The bot started working and receiving messages.
And everything seems to be in order!
The bot receives messages throughout the day, but constantly stops receiving messages.
Sometimes after 2 hours, sometimes after 12 hours, different all the time.
If I stop the server and start it again, the bot starts receiving messages again
Recently he received messages for almost 24 hours, but he stopped receiving messages again.
What could be the reason for these stops specifically when receiving messages?
I followed all the recommendations to configure the IIS server, my test application
guaranteed to work, the bot sends a message every hour and never stops sending,
but receiving messages systematically stops
The text was updated successfully, but these errors were encountered: