Not a subscriber?

Join thousands of others who are building self-directed lives through creativity, grit, and digital strategy—breaking free from the 9–5.
Receive one free message a week

Sleep Deprived WCF Error

I just got off a really long week at a client setting up Team Foundation Server. Tonight I was putting some final touches on my WCF portion of my Twin Cities Code Camp talk that is going to be tomorrow. Having a 4 week old baby and having travlled all day yesterday with no sleep due to the baby has left me in an “altered state”. AKA: I’m not running on all cylinders right now. Anyway … to the good stuff…

 

I kept getting the following error:

 

“The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata.”

image

 

I found a post by Julie Lerman here that spoke of the same issue. Well, this is also my “Stupid” mistake.. except all of my namespaces were incorrect. However my problem was that I had taken the configuration for the service and forgot to add on the actual type declaration. So instead of the namespace being:

 

TwinCitiesCodeCamp.SmoothOperator.OrderService.OrderService 

… I had it as …

TwinCitiesCodeCamp.SmoothOperator.OrderService  

 

The type declaration was missing. Leaving this off will give the WCF Test Client problems. I do have to give it up to Microsoft because this Test Client was not in VS2005. It has helped me fail fast in this scenario.

Oops. Need sleep.. .

 

Update: This error can also occur if you happen to put a “DataMemberAttribute” on a Enum value. It should be set to “EnumMemberAttribute”.