I am getting a lost connection exception but the call is succeeding
-
I am writing a WCF client accessing a 3rd party server. I put the call in a try catch block and the catch gives a "The underlying connection was closed: An unexpected error occurred on a receive". Since the call actually ran, I have no idea why it gives this error. try { XMLObject theResults = _UnifierWebServices.createBPRecord(x, y, z); return CheckForSuccess(theResults, BPName, false); } catch (Exception e) { // Lost Connection Exception }
-
I am writing a WCF client accessing a 3rd party server. I put the call in a try catch block and the catch gives a "The underlying connection was closed: An unexpected error occurred on a receive". Since the call actually ran, I have no idea why it gives this error. try { XMLObject theResults = _UnifierWebServices.createBPRecord(x, y, z); return CheckForSuccess(theResults, BPName, false); } catch (Exception e) { // Lost Connection Exception }
In my WCF services (that I have control over) I find I get the lost connection when sending a call to a WCF service and that service throws an exception. Try configuring the third party service to return the exception on a call to see what is causing the exception. If you cannot do that, you may need to pull in the third party to discuss how they are logging exceptions within their service so you can debug it.
Software Zen: delete this;