Posts

Showing posts with the label WCF

Using WCF with non-microsoft clients

The default wsdl that WCF creates isn't very friendly for human's and other non-microsoft clients to read. To remedy this you can intsall WCFExtras: http://wcfextras.codeplex.com/ To use it, in your endpoint declaration add a " behaviorConfiguration " element with a name something like " WsdlRedirect ". Then add an endpointBehaviors declaration something like this:       < behaviors >        < endpointBehaviors >          < behavior name =" WsdlRedirect " >            < wsdlExtensions location =" https://testwebservices.website.ca/SomeService.svc "                            singleFile =" True " / >          < / behavior >   ...

404 error in a REST WCF service

I created my first WCF REST service the other day and was getting a 404 error when I deployed the service to our server.  After some research I found the solution here: http://www.west-wind.com/weblog/posts/2008/Apr/10/WCF-REST-Configuration-for-ASPNET-AJAX-and-plain-REST-Services I needed to add: Factory ="System.ServiceModel.Activation.WebServiceHostFactory" to MyService.svc <% @ ServiceHost markup. There is also a very good write up on WCF REST service design here: http://msdn.microsoft.com/en-us/library/dd203052.aspx