Failed to load resource: the server responded with a status of 500 (Internal Server Error)
生活随笔
收集整理的這篇文章主要介紹了
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
【原因】
因?yàn)檫@個(gè)表和另一個(gè)表是有一對(duì)多關(guān)系的,當(dāng)序列化表1的時(shí)候,會(huì)找到和另一個(gè)表2關(guān)聯(lián)的字段,就會(huì)到另一個(gè)表2中序列化,然后另一個(gè)表2中也有一個(gè)字段和表1相關(guān)聯(lián).這樣.序列化就會(huì)發(fā)生這種錯(cuò)誤!
【解決方案】
/注:這里值得注意的是,當(dāng)有外鍵向關(guān)聯(lián)時(shí),必須要指定序列化元素,如果沒(méi)有外鍵相關(guān)聯(lián),直接序列化該實(shí)體對(duì)象
return Json(new { ti.TypeName,ti.Typevalue,ti.UserId,ti.Remark,ti.FullPath,ti.TyId,ti.isdisplay}, JsonRequestBehavior.AllowGet);
?
轉(zhuǎn)載于:https://www.cnblogs.com/libo-2249/p/9976995.html
總結(jié)
以上是生活随笔為你收集整理的Failed to load resource: the server responded with a status of 500 (Internal Server Error)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 绝地求生刺激战场下载安装
- 下一篇: Ros学习topic——小海龟