2017-08-05 37 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.