WCF : First Steps

Posted on February 9, 2007
Filed Under Uncategorized | Leave a Comment

Today I’m going to get my head around the WCF and run up some examples, so expect some short bursty posts over the next few days.  Let’s get to it.

 

I suppose the first place to go is the Windows Communication Foundation home page at MSDN2.  This is a bunch of arbitrary, disparate and what’s new links.  I don’t like this page much, its largely marketing and doesn’t work for me.  The real meat is at the Guide to the Documentation.  Start there!

 

After a bit of reading I decided to flex my muscles by downloading, building and running up WCF samples.  This was pretty well documented in its setup instructions page. 

 

Now I have a laptop with Windows XP and IIS 5.1 running.  I installed, built and run the Getting Started WCF example (http://localhost/ServiceModelSamples/service.svc).  When I did I got the following page displayed in my browser:

 

<%@ServiceHost language=c# Debug=”true” Service=”Microsoft.ServiceModel.Samples.CalculatorService” %>

 

This told me that my .svc extensions are not been executed by IIS.  A quick poke around the troubleshooting section and I get a nice write up on why a IIS Hosted Service Fails.  Sweet! 

 

Now remember that I’m running IIS 5.1 and to fix the problem described in the troubleshooting post I need to Add an Application Extension Mapping to map .svc URIs onto the aspnet_isapi.dll to handle my WCF services.  However, the OK button remains unavailable.  I cannot click the damned thing to add the .svc Application Extension Mapping to IIS.  Ahhhh…

 

Next stop is a trip to the Microsoft Knowledge Base where I find the following article (id 317948):

 

So its a known problem.  That’s Nice.  Just to be clear, the OK button doesn’t highlight until you pick an .exe file, any .exe file.  Only then does it becomes available.  Now just change the execulate to be the required full path to your aspnet_isapi.dll file, for example:

 

Now traverse to your original .svc URL and things should be different.  I’ve got a feeling things are going to get a little bit more interesting as we get further on in…

Comments

Leave a Reply