WCF error: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
This error likely comes from USING() statement. In order to protect the service call on Client, the using() statement is used to check the service status first before the program proceeds to next procedure. It hides the real exception behind the screen, so when we are doing debugging on development, if we see this error, we need to comment out using().
change
using
(
ProductsClient.ServiceReference1.ProductsServiceClient proxy = new ProductsClient.ServiceReference1.ProductsServiceClient( )
)
to
try
{
ProductsClient.ServiceReference1.ProductsServiceClient proxy = new ProductsClient.ServiceReference1.ProductsServiceClient( )
}
catch
{
}