一、报错截图如下所示:
二、报错代码:
List<BarcodeEntity> Lists = _IBarcode.GetBarcodeByWhAndType(WhId,BarcodeType);
return Json(Lists,JsonRequestBehavior.AllowGet);
三、修正代码:
List<BarcodeEntity> Lists = _IBarcode.GetBarcodeByWhAndType(WhId,BarcodeType);
var seriializer = new JavaScriptSerializer();
seriializer.MaxJsonLength = Int32.MaxValue;
var result = new ContentResult
{Content = seriializer.Serialize(Lists),ContentType = "application/json"
};
return result;