The communication object, System.ServiceModel.Channels.ServiceChannel,
cannot be used for communication because it is in the Faulted state.
What is this error all about, and how would I go about solving it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You get this error because you let a .NET exception happen on your server side, and you didn’t catch and handle it, and didn’t convert it to a SOAP fault, either.
Now since the server side “bombed” out, the WCF runtime has “faulted” the channel – e.g. the communication link between the client and the server is unusable – after all, it looks like your server just blew up, so you cannot communicate with it any more.
So what you need to do is:
always catch and handle your server-side errors – do not let .NET exceptions travel from the server to the client – always wrap those into interoperable SOAP faults. Check out the WCF IErrorHandler interface and implement it on the server side
if you’re about to send a second message onto your channel from the client, make sure the channel is not in the faulted state:
If it is, all you can do is dispose of it and re-create the client side proxy again and then try again