Friday, December 9, 2011

Simple WCF Rest Service

I recently found myself struggling to get a simple Rest Service working through WCF. I have very little experience with WCF and my Rest experience has been through ASP.NET MVC. As easy as it is in MVC I was expecting it to be easier in WCF (after all there should be less to worry about).

After struggling for 30-60 minutes and fumbling with how to word my problem in google, I finally found this posting which saved my day…

Long story short, change the Factory and gut the web.config – now that is easy!

<%@ ServiceHost Service="Services.InvoiceService" Factory="System.ServiceModel.Activation.WebServiceHostFactory" %>

No comments:

Post a Comment