Ajax call not hitting the controller action method, status 500 , Internal Server Error

Apr 2, 2014 at 1:39 PM
My Ajax call to controller action method is not hitting the controller , it breaks in between. It says that xhr.status = 500 , response text = Internal Server Error

The same code is working fine in other project.

.Js code

ajaxCall: function (data, url, success, error, noShow) {
// make sure that there is never an empty POST body to protect against proxy allowing too soon
if (!data) {
    data = "{'dummy':1}";
var reqData = data;
    type: "POST",
    traditional: true,
    url: url,
    data: data,
    // switch on/off geenraic AJAX events bound globally
    /** @default false
    global: !(noShow || false),
    cache: false,
    dataType: "json",
    // add CSRF token to each request
    beforeSend: function (xhr) { /* jquery 1.5.* use headers */
        var csrf_token = $("[name=__RequestVerificationToken]").val();
        xhr.setRequestHeader('__RequestVerificationToken', csrf_token);
    contentType: "application/json",
    success: function (data) {
    error: function (a, b, c) {
        // repeat ajax call when "Empty body element" message gets returned. It means that proxy challenge was completed too soon.
        if (a.responseText == "EmptyBodyElement")
            Service.ajaxCall(reqData, url, success, error);
        else {
            if (error)
                error(a, b, c);
                Service.responseError(a, b, c);
},I am receiving error in jQuery1.9.1

if ( callback && ( isAbort || xhr.readyState === 4 ) ) xhr.status = 500 shr.responsetext = Internal Server Error

The same code working in other projects , I have checked all the regrences are in place.
Apr 3, 2014 at 7:43 AM
Is this in any way related to MVC Forum ???? If not, as written at the top of the discussion's tab:

Please do not post question about ASP.NET MVC in general here, only questions regarding the MVC Forum project!

For questions about ASP.NET MVC, go visit the project page for ASP.NET MVC or go visit the general ASP.NET website.