TelegramBot申请停止与此错误(SocketException,请IOException异常,引发WebException,HttpRequestException)工作

我不知道我能do.My什么telegrambot项目突然停止后约1 day.with这样的错误工作。如果可能,请帮助我。TelegramBot申请停止与此错误(SocketException,请IOException异常,引发WebException,HttpRequestException)工作

Framework Version: v4.0.30319 

Description: The process was terminated due to an unhandled exception.

Exception Info: System.Net.Sockets.SocketException

at System.Net.Sockets.Socket.EndReceive(System.IAsyncResult)

at System.Net.Sockets.NetworkStream.EndRead(System.IAsyncResult)

Exception Info: System.IO.IOException

at System.Net.Security._SslStream.EndRead(System.IAsyncResult)

at System.Net.TlsStream.EndRead(System.IAsyncResult)

at System.Net.PooledStream.EndRead(System.IAsyncResult)

at System.Net.Connection.ReadCallback(System.IAsyncResult)

Exception Info: System.Net.WebException

at System.Net.HttpWebRequest.EndGetResponse(System.IAsyncResult)

at System.Net.Http.HttpClientHandler.GetResponseCallback(System.IAsyncResult)

Exception Info: System.Net.Http.HttpRequestException

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)

at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResult() at Telegram.Bot.TelegramBotClient+<SendWebRequestAsync>d__1091[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()

Exception Info: System.AggregateException

at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean)

at System.Threading.Tasks.Task1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResultCore(Boolean) at System.Threading.Tasks.Task1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Result()

at Mybot.BotForm.RunBot()

at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)

at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

at System.Threading.ThreadHelper.ThreadStart()

回答:

它的因为你的池方式。可能你的应用程序内存或网络连接不足。你可以简单地忽略这个异常,你的操作系统会处理它,但是如果你打算把它用作你的长时间轮询方法,你应该在每次请求后仔细处理这些对象。 我强烈建议使用webhook而不是更新方法。它非常快速和高效。

以上是 TelegramBot申请停止与此错误(SocketException,请IOException异常,引发WebException,HttpRequestException)工作 的全部内容, 来源链接: utcz.com/qa/261020.html

回到顶部