This project is read-only.


Topics: Web Api
Oct 18, 2011 at 10:19 AM
Edited Oct 18, 2011 at 10:19 AM


I'm in the process of moving from WCF REST Template API to the WCF WebAPI, and it seems to go pretty smooth... however I 

have a number of services that returns a Message object.

However everytime I try to call one of these services I get the following error:

The service operation 'xxx' has a return value of type 'Message' associated with the request message content that is not supported by the HttpOperationHandlerFactory.

Is there a way to make this work without changing my existing services??

If yes, could you guide me in the right direction...




Oct 18, 2011 at 2:33 PM

You do need to change your services a bit but it should be straight forward. Change the return type to HttpResponseMessage and then create an instance in your service operation and fill it in with whatever your response needs.