Error adding service reference: Type is a recursive collection data contract which is not supported

前端 未结 4 1892
你的背包
你的背包 2021-01-11 09:05

I tried to add a service reference to a WCF service that resides in the same solution from an ASP.NET MVC 4 project but failed. I got a error saying:

4条回答
  •  误落风尘
    2021-01-11 10:03

    Do you really mean to return a node in an arbitrarily deep tree?

    If so, then instead of returning a JToken, first convert it to a string to get the JSon text. On the client end, you can Jtoken.Parse(yourstring) back into a JToken.

    If not, then consider passing back the Value and letting the serialization deal with T.

提交回复
热议问题