Json allowget error

后端 未结 4 444
难免孤独
难免孤独 2021-02-03 17:34

This error comes up in our MVC app randomly. Sometimes doing the same exact thing it won\'t sometimes, it will. Does anyone know if this has to do with anything that could be a

4条回答
  •  无人及你
    2021-02-03 17:50

    It seems that you call sometime the controller action per HTTP GET. To be able to return JSON results you should use code like

    return Json(data, JsonRequestBehavior.AllowGet);
    

提交回复
热议问题