且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Ajax请求使用MVC和$ .ajax调用与POST一起返回HTTP错误500?

更新时间:2022-03-23 23:03:55

好了,我能够弄清楚问题出在哪里,我的AJAX语法甚至操作都没有错.只是我返回的对象包含一个循环引用.通过单击网络"标签下的POST请求,然后查看预览"标签,我可以看到chrome控制台中的实际错误.这显示了实际的错误消息.

Well I was able to figure out what the problem was, there was nothing wrong with my AJAX syntax, or even the action. It was just that my returned object contained a circular reference. I was able to see the actual error in chrome console by clicking on the POST request under Network tab, then viewing the preview tab. This displayed the actual error message.