underlying connection is closed RRS feed

  • Question

  • we have thick client winforms application which consumes a webservice . this throws up an excepyion of type System.Net.WebException

    "Underlying connection was closed. An unexpected error occured on recieve"

    We have tried to override GetWebRequest method in Reference.cs by setting KeepAlive = false. But it does not solve the issue. The timeout on IIS has also been increased without much luck. Any thoughts is greatly appreciated

    Saturday, February 24, 2007 11:45 AM

All replies

  • is this an intermittent error, or does this happen every time? Is it pure HTTP or HTTPS? Do you use any authentication underneath?
    Friday, March 2, 2007 3:29 AM
  • Hi

    This is an intermittent error. It is on HTTP


    Friday, March 2, 2007 9:34 AM
  • Have you checked to see if the webservice request is executing correctly or if it's generating an exception? If an error occurs on the server side it would stand to reason that the connection would be closed.


    Friday, March 2, 2007 10:48 AM