0

Could someone explain why this is happening, I have a C# backend that I'm connecting to via WCF. In the back end, i have two classes in the same namespace that have two properties that have the same name. These classes are used in a separate object. The types of the properties are different, one is a string and one is an object but there seems to be some sort of collision when deserializing the object?

It's returning this random error when I call to return the object.

This could be due to the service endpoint binding not using the HTTP 
protocol. This could also be due to an HTTP request context being aborted by 
the server (possibly due to the service shutting down). See server logs for 
more details.

Here are the classes, the property causing the problem is BCIssued

public class Activities
{
    public string ApplicationReceived { get; set; }
    public string PIMGranted { get; set; }
    public Bcgranted[] BCGranted { get; set; }
    public object CCCGranted { get; set; }
  //  public object BCIssued { get; set; }
    public object CCCIssued { get; set; }
}


public class CCC
{
    public string BCIssued { get; set; }
    public string FinalIns { get; set; }
    public string LapsedMonths { get; set; }
    public object WorkStarted { get; set; }
    public object Notified { get; set; }
    public object Lapsed { get; set; }
    public object Extension { get; set; }
}
A.K.
  • 2,284
  • 3
  • 26
  • 35
Damage
  • 29
  • 10
  • What is the exact exception that is in the server log? Enable tracing https://stackoverflow.com/questions/4271517/how-to-turn-on-wcf-tracing if you can't find it – rene Aug 05 '17 at 06:55
  • Thanks, I don't have access to the environment at the moment, but I'll turn that on and post the results as soon as i can – Damage Aug 05 '17 at 07:02

1 Answers1

0

Thanks to Rene's post about WCF logging, i was able to turn on logging and found the error on the server side

Type 'Newtonsoft.Json.Linq.JToken' is a recursive collection data contract 
which is not supported. Consider modifying the definition of collection 
'Newtonsoft.Json.Linq.JToken' to remove references to itself.
Damage
  • 29
  • 10