Ajax Request returns HTTP error 500, using MVC and $.ajax call with POST? Ajax Request returns HTTP error 500, using MVC and $.ajax call with POST? jquery jquery

Ajax Request returns HTTP error 500, using MVC and $.ajax call with POST?


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.


Old post, alternative answer ... Just in case someone ends up here ..

My issue was caused by the fact that my controller action that I was calling returned a Partial View Action Result and the PartialView .cshtml file was not being published onto the server (wasnt "included" in the Visual Studio project when publishing).


Fiddler is a great tool for catching http requests which is quite useful for debugging responses between client side and server side. Just open it when you are suspecting the problem in your browser, and when the error occur open fiddler and choose the request, then view its raw information.