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
dlpfis
Member
46 Points
77 Posts
CommunicationException was unhandled c# webservice
Jan 09, 2013 09:55 PM|LINK
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
sameer_khanj...
Contributor
7046 Points
1376 Posts
Re: CommunicationException was unhandled c# webservice
Jan 10, 2013 12:39 PM|LINK
check
http://stackoverflow.com/questions/5621354/how-to-resolve-wcf-communicationexception-was-unhandled
sameer.khanjit@gmail.com
View Blog
Click "Mark as Answer" on the post that helped you.
Nico_He
Member
114 Points
27 Posts
Re: CommunicationException was unhandled c# webservice
Jan 23, 2013 03:36 AM|LINK
Is the issue resolved?