2017-08-05 58 views
0

有人可以解释为什么发生这种情况,我有一个C#后端,我通过WCF连接到。在后端,我在同一个名字空间中有两个类,它们具有两个具有相同名称的属性。这些类在一个单独的对象中使用。属性的类型是不同的,一个是字符串,另一个是对象,但是在反序列化对象时似乎有某种碰撞?与wcf对象冲突

当我打电话返回对象它返回此随机误差。

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. 

这里是班,导致问题的性质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; } 
} 
+0

什么是确切的例外是在服务器日志?启用跟踪https://stackoverflow.com/questions/4271517/how-to-turn-on-wcf-tracing如果你找不到它 – rene

+0

谢谢,我目前无法访问环境,但我我会尽快开启并发布结果 – Damage

回答

0

由于刘若英的一篇关于WCF记录,我能打开日志记录,发现在服务器端

错误
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.