System.Net.WebException: The request was aborted: the request was cancelled

前端 未结 5 554
余生分开走
余生分开走 2021-02-04 06:45

I have a WCF service that has been giving me this error under load conditions (and I can\'t seem to recreate the error otherwise). We\'ve been trying to find a way around it for

5条回答
  •  半阙折子戏
    2021-02-04 07:38

    I don't think that HTTP keep alive is responsible for this. WCF should be able to handle this by itself so the HTTP persistant connection is shared among requests and if it expires (it expires after 100s of inactivity) WCF creates new one without firing any exception. If your connection is aborted during request transmission then I expect there will be some other problem.

    You can use this custom binding as equivalent to BasicHttpBinding without HTTP keep alive:

    
      
        
          
          
        
      
     
    

提交回复
热议问题