locked
CommunicationException was unhandled c# webservice RRS feed

  • Question

  • User1072762708 posted

    I have a c# webservice that acceses a DB. There are numerous clients running a windows form that polls this webservice for data. I migrated the webservice and the database to new servers. I published the exact same website and then modified the connectionstring in the web.config for the new location of the database. That database is on SQL, and i moved it via the backup/restore method available in sql.

    Before Migration:

    Both site and DB on same standalone box.

    Server 2003

    SQL 2005 Express

    After Migration:

    Site and DB on different (virtual) machines)

    Server Enterprise SP2

    SQL Server 2005

     

    Everything runs fine as before, except now I occasionally get this CommunicationException was unhandled error on the clients. It's not a specific function in the webservice, it can happen on any of them. And it happens without rhyme or reason. It doesn't happen on all the clients, or even multiple clients, at the same time. It happens more frequently on some clients than others. (I left the client running on my pc for almost 2 days before it had an issue. on some clients it can happen 2 or three times a day)  Part of the inner exception is included below, I can append all of it if requested. Any help is much appreciated.

    System.ServiceModel.CommunicationException was unhandled   Message=An error occurred while receiving the HTTP response to http://blahblah/service.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.  

    And then the three messages below are buried in the stack trace:

    Message=The underlying connection was closed: An unexpected error occurred on a receive.     Message=Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Message=An existing connection was forcibly closed by the remote host                 

    Thanks in advance

    Wednesday, January 9, 2013 5:55 PM

All replies