Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Faulted state
Message
From
04/09/2008 12:30:41
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Windows Communication Foundation (WCF)
Title:
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01344276
Message ID:
01344850
Views:
11
>I just wanted to follow up with this. Tim & I went back and forth with this offline and resolved this particular error. When you use WCF you have to configure what is called an "end point" (think URI, ex. http://www.zzzzzzzz.com/MyWCFSite). This can be configured in either the *.config file or programmatically. In Tim's web.config he had the endpoint address partially filled in. However, he was configuring it programmatically (which you would think would completely override the *.config file setting). What actually happens is that it suffixed his programmatic endpoint with what was configured in the *.config file. This caused the error he was seeing.
>
>It sounds like a bad design in WCF, but from what I understand it's a design feature: you can use a relative address configured in the *.config file and then swap out the actual web address in code and WCF builds the full URI from both (so you wouldn't need code changes between dev. and production).


I am going to add onto this a bit more Paul,
The program I was testing with was a tester app where I hard coded the uri, but in my actual app I have it configured in a settings file. See below configuration file property. Notice the uri does not have "mex" on the end. On the other hand the WCF service has an endpoint configured with an "address" value. If this is left blank it must resolve as a direct reference to the service.svc file. But the web.config had the address set with address="mex" and thus was the problem. Once this was removed it resolved. Now, see below for one more issue.
/// <summary>
/// TrackerUrl Property
/// </summary>
public string TrackerUri
{
	get { return _trackerUri; }
	set { _trackerUri = value; }
}
private string _trackerUri = "http://www.MyDomain.com/Tracker/tracker.svc";
The message I posted this thread for appears to be a standard returned message from a WCF for many different probelms. Currently, I am hitting the WCF site just fine but getting an exception due to an invalid object in the adapter.Fill method of the SQL Adapter. After throwing the exception, I still get the exact same "ServiceChannel, cannot be used for communciation because it is in a Faulted state" message. Be aware, the problem could be anything in the WCF and still get this message.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform