The client disconnected

后端 未结 2 1543
既然无缘
既然无缘 2021-01-18 06:23

I\'m getting the following error in logs for WebAPI

System.Web.HttpException (0x800703E3): The client disconnected. at System.Web.Hosting.IIS7Wor

相关标签:
2条回答
  • 2021-01-18 07:01

    You can ignore these exceptions.

    The exception says what the problem is: "The client disconnected". It means that the client initiated a request but then disconnected before it bothered to read all of the response.

    There are any numbers of reasons why that might be the case, but (unless you have a dodgy internet connection at your server end) it is almost certainly an issue at the client end. I regularly see these myself and mostly it seems to be related to a bot. So I filter them out and ignore them.

    0 讨论(0)
  • 2021-01-18 07:05
    try
    {
       // Open Connection
       // Do stuff
    }
    catch (HttpException  ex)
    {
       // Log it?
       // Ignore it? 
       // Do what you want with it?
    }
    finally
    {
       // Close connection
    }
    
    0 讨论(0)
提交回复
热议问题