Daily Archives: January 18, 2008

My Dumb WCF Lesson for the day

I was moving some code around and had a nice WCF Service Interface and Service Class created. So I copied them into a new project where I was re-creating my work.

When I tried to debug (self-host) the service, just to test it out with the embedded WCF Test Client.

But I kept getting this error:

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

This made no sense. My config file was fine. I even created a new WCF service in the solution, confirmed that it worked properly, then compared the config files line by line.

No problems.

After going around in circles for a while (including getting zero google results for that error message), a thought occurred to me. I copied and pasted the entire contents of the Interface and the service class. I hadn’t changed the namespace!

That was the problem. I fixed the namespace and the service ran in the Test Client just fine.

Entity Framework Extension Methods

A few weeks ago, I was mooning over Extension Methods. Somehow, in the collection of language enhancements to VB9 and C#3, they have become a bit of a sleeper feature in light of LINQ. Everything is though, right?

So I wrote about them and thought about them, but then went back to my task at hand.

Danny Simmons also recently started seeing the light about Extension MEthods. But instead of going back to what he was doing, he spent quite a bit of time playing with them and is now blogging an Entity Framework Extension Method Extravaganza!

He’s going crazy with it already. What fun!