"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."
Most of the suggestions found in Web blamed the invalid code, giving examples similar to the following one:
Since I was sure this was not the case I had to discover the real exception reason by myself.
using (MyWebServiceClient service = new MyWegServiceClient())
{
service.DoSomeOperation();
service.Close();
service.DoAnotherOperation();
}
Solution:
After debugging the app it came out that solution was quite simple - the service configuration (URL, security settings) was invalid. I found that out by analyzing the InnerException of the main Exception. The logged exception message was rather irrelevant to the actuall error.

1 comments:
The reason that you weren't getting a useful error message may be due to the using block. See:
http://msdn.microsoft.com/en-us/library/aa355056.aspx
Post a Comment