Self referencing loop detected for property 错误
EF 序列化返回json时
报错:Self referencing loop detected for property
解决方案:在webapiconfig.cs文件中,增加设置:
1.config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling=Newtonsoft.Json.ReferenceLoopHandling.Serializer;
2.Config.Fomatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling=Newtonsoft.Json.preserveReferenceHandling.objects;
Self referencing loop detected for property 错误的更多相关文章
- codefirst mvc Self referencing loop detected for property
登录时,json序列化用户类时提示错误"Self referencing loop detected for property--",经过5个小时的查找,发现原因可能是,用户类包含 ...
- Request failed with status code 500以及自引用循环Self referencing loop detected for property ‘xx‘ with type
错误Error: Request failed with status code 500 ,调试前端没问题,后端也没问题,还报错"连接超时" 在Network中找到错误Self r ...
- JSON.NET的Self referencing loop detected with type的原因以及解决办法
模型中有循环引用是很常见的.例如,以下模型显示双向导航属性: : public class Category : { : public Category() : { : Products = new ...
- EF关于报错Self referencing loop detected with type的原因以及解决办法
1)具体报错 { "Message": "出现错误.", "ExceptionMessage": "“ObjectContent` ...
- .NET JSON 转换 Error ” Self referencing loop detected for type“
在进行实体转换为Json格式报错如下图: Self referencing loop detected for property 'md_agent' with type 'System.Data.E ...
- c# json 序列化时遇到错误 error Self referencing loop detected for type
参考网址:http://blog.csdn.net/adenfeng/article/details/41622255 在写redis缓存帮助类的时候遇到的这个问题,本来打算先序列化一个实体为json ...
- Json Self referencing loop detected
Self referencing loop detected......的错误 解决方案: 1 增加 [JsonIgnore] 过滤关联,使其不参与序列化. 这个方法简单粗暴.但是你就没办法获取关 ...
- Self referencing loop detected with type
json.net namespace EFDAL{ using System; using System.Collections.Generic; using Newtonsoft. ...
- Newtonsoft.Json转换强类型DataTable错误:Self referencing loop detected with type ......
问题,在使用Newtonsoft.Json对强类型的DataTable进行系列化时会出现循环引用错误 解决办法,不要直接系列化强类型的DataTable,改为 JsonConvert.Serializ ...
随机推荐
- paloalto防火墙的优势
1.所有 Palo Alto Networks 防火墙提供一个可用于执行防火墙管理功能的带外管理端口 (MGT).通过使用该 MGT 端口,可以将防火墙的管理功能与数据处理功能分开,从而保护对防火墙的 ...
- uni-app
1 路由的跳转 uni.navigateTo({ url:'/pages/home/search' }); //非tabBar页面跳转 uni.switchTab({ url:"/pages ...
- jna调用c++的dll
import java.util.ArrayList; import java.util.List; import com.sun.jna.Structure; public class MyStru ...
- 使用idea的springboot项目出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
参考: https://www.cnblogs.com/lfm601508022/p/InvalidBoundStatement.html https://blog.csdn.net/xsggsx/a ...
- 将python文件打包成exe可运行文件
https://blog.csdn.net/douzhenwen/article/details/78886244
- nodejs 使用官方oracledb库连接数据库 教程
https://www.cnblogs.com/rysinal/p/7779055.html 导读 linux下安装使用 gcc安装 nodejs安装 oracle客户端安装 npm安装oracled ...
- vue项目获取地址栏参数(非路由传参)
在项目中,遇到一个需求,就是另一个系统直接跳转到我们项目中的某个页面,不需要做用户的校验直接单纯的跳转新页面,再初始化查询数据,参数以地址栏的形式传入 由于原来项目做过权限控制,所以在路由那边需要进行 ...
- [二分答案][NOIP2015]跳石头
跳石头 题目描述 一年一度的“跳石头”比赛又要开始了!这项比赛将在一条笔直的河道中进行,河道中分布着一些巨大岩石.组委会已经选择好了两块岩石作为比赛起点和终点.在起点和终点之间,有 N 块岩石(不含起 ...
- experiment 3
#include <stdio.h> int main() { int number, max, min, n; n=; printf("请输入%d个数: ", n); ...
- map获取数字与int比较
已知 map.get("id")为数字,如:123问题 id.equals(123) 结果为false而使用 int id = (Integer)map.get("id& ...