Can a custom WebContentTypeMapper be used with a WCF data service RRS feed

  • Question

  • I have a problem using a wcf data service in combination with the webHttpRelayBinding and a content-type of application/json.

    I have asked the question in detail here : http://social.msdn.microsoft.com/Forums/en-US/servbus/thread/ae0033de-d97b-4b92-9c6e-98abe5d89321

    In the discussion about the same problem, but for a WCF Rest service, the moderator aludes to creating a WebContentTypeMapper as a solution : http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/06a59496-7b37-4145-bbb4-76048faf4360

    So, my question is, can a custom WebContentTypeMapper be used with a WCF data service, and do you think it would help solve my problem?

    Monday, March 18, 2013 11:35 AM

All replies

  • Hi,

    It seems like a Azure related problem. You could try Azure forum: http://social.msdn.microsoft.com/Forums/en-US/category/windowsazureplatform

    Wednesday, March 20, 2013 2:34 AM
  • Yes, I have already done that.  The first link I gave is to the azure forum where I posted the question. 

    I posted the question on this forum because I was getting no response on the azure forum.

    I can't be certain, but my debugging seems to indicate it isn't really an azure problem.  I have done some verbose tracing and I can see the messages arriving correctly from Azure.

    I think the problem lies with a combination of the webHttpRelayBinding and WCF Data Services.  With regular WCF services, one can create a WebContentTypeMapper to address my problem, but I don't know if that is possible (or logical) with WCF Data Services.  That is my question.

    Wednesday, March 20, 2013 4:02 AM
  • Hi Jenkis,

    Welcome to the MSDN forum.

    I am trying to involve a senior expert into your thread. Please wait for the response. Sorry for the inconvenience.

    Good day.

    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 21, 2013 1:57 AM
  • Hello,

    I tested adding a WebContentTypeMapper with WCF Data Services. I was able to get it set up and the code in my WebContentTypeMapper did get executed but this caused an issue with my service URL. I could not get to my data through the service. I get HTTP 500 error.

    I think this is because data services has one service contract, IRequerstHandler, so I had to change my endpoint address to obtain multiple endpoints. The address cannot be the same as the IRequesthandler endpoint so this is not possible. 

    Terrell An -MSFT

    Friday, March 22, 2013 7:38 PM