標籤:屬性 set serial method stack 參數 json over bapi
參考頁面:
http://www.yuanjiaocheng.net/webapi/parameter-binding.html
http://www.yuanjiaocheng.net/webapi/action-method-returntype.html
http://www.yuanjiaocheng.net/webapi/web-api-reqresq-format.html
http://www.yuanjiaocheng.net/webapi/media-formatter.html
http://www.yuanjiaocheng.net/webapi/webapi-filters.html
1,現象:網站應用程式程式池停止運行,系統日誌為: 1)
錯誤應用程式名稱: w3wp.exe,版本: 7.5.7601.17514,時間戳記: 0x4ce7a5f8
錯誤模組名稱: unknown,版本: 0.0.0.0,時間戳記: 0x00000000
異常代碼: 0xc00000fd
錯誤位移量: 0x36773800
錯誤進程 ID: 0x1b0c
錯誤應用程式啟動時間: 0x01d2626116b1ea92
錯誤應用程式路徑: C:\Windows\SysWOW64\inetsrv\w3wp.exe
錯誤模組路徑: unknown
報告 ID: 54a68ba9-ce54-11e6-aeff-1866dae93909
2)
問題籤名:
P1: w3wp.exe
P2: 7.5.7601.17514
P3: 4ce7a5f8
P4: *****
P5: 1.0.0.0
P6: 5865f074
P7: 72a
P8: 0
P9: System.StackOverflowException
P10:
2,JsonConvert.SerializeObject(o, Formatting.Indented);這的時候報錯 o是一個對象。 最終報錯位置為
public Decimal budget
{
set { _budget = value; }
get { return _budget; }
}
未處理System.StackOverflowException Message: “System.StackOverflowException”類型的未處理的例外狀況在 *** 中發生 3,錯誤分析:Newtonsoft方法直接報錯,無法調試,難道是Newtonsoft無法序列化Decimal類型的屬性? 4,迂迴解決方案:設定budget不可被序列化。 5,跪求真正的可以序列化Decimal類型的屬性的方法
Newtonsoft.Json設定類的屬性不序列化