Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET WCF testing
Dear Sir,

How to solve this error:

The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

Way me.
Posted 31-Jan-12 4:07am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There are many threads on this topic: Google Search[^].
The first link on the page: MSDN Forum looks quite promising.
I'm not entirely sure on this one, but it too looks promising:[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Avoid placing client proxies in using statement
using(var testSvc = testService.Test())
   // Code here
var testSvc = testService.Test();
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Solution 3 is Completely Wrong!
Because if you're gonna call it several time in a loop you'll have time out exception if you don't consider putting the client proxy in a disposing using statement!
The Only Reason For This Exception:
1- Unhanded Exception On Server Side!
2-Handled but not reflected in SOAPException Object On Server Side!
Good Luck EveryBody!
CHill60 at 30-Jan-15 12:19pm
You would have been better off rating the solution and/or posting this comment against that solution. It's inappropriate to start posting solutions to old questions
Houman Masnavi ,Phd at 30-Jan-15 12:22pm
I was solving this problem for 2 days and I think its can be useful for future searchers! I'm not looking for any rating or point in this site! just helping other programmers! ;)
CHill60 at 30-Jan-15 12:30pm
That's why I suggested that you rated Solution 3 with a single star - it's our way of saying "this is not good" here.
You can also use the "Have a Question or Comment" link to comment about a specific post - which would also have been appropriate here as future searchers would associate your post with the incorrect post.
If Solution 3 is ever deleted, this post is not going to make sense

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 30 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100