If I use only simple methods in my WCF service, everything works fine. However, if I include the following method, a problem occurs:
[OperationContract]
public List<KeyValuePair<string, string>> GetAllAccounts()
{
return AccountBusiness.GetAllAccounts();
}
I get this error when accessing a service from another project:
Warning 5 Custom tool warning: cannot import wsdl: portType Details: when starting the WSDL import extension, an exception was thrown: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Type "Newtonsoft.Json.Linq.JToken" is a contract with recursive collection data, which is not supported . Consider modifying the definition of the Newtonsoft.Json.Linq.JToken collection to remove the reference to yourself. XPath to Error Source: // wsdl: definitions [@targetNamespace = ' http://tempuri.org '] / wsdl: portType [@ name = 'NodeService'] C: \ inetpub \ wwwroot \ MyclientProject \ Service Links \ NodeService \ Reference.svcmap 1 1 MyClientNode
, , . , .
, , Visual Studio 2012 Visual Studio 2010. .
, " ", .