Web Api错误500

时间:2014-05-06 12:34:59

标签: asp.net-web-api

我有一个ajax调用,我通过它调用我的Web Api.My代码如下 -

function DataFrame() {

                var abc = {};
                abc.Country = countryName;
                abc.Month = monthName;
                abc.SampleData = selectedStores;
                var datatoSend = JSON.stringify(abc);
                jQuery.support.cors = true;
                $.ajax({
                    url: URL + '/api/Sample/AddSampleToFrame/',
                    type: "Post",
                    data: JSON.stringify(datatoSend),
                    contentType: 'application/json; charset=utf-8',
                    success: function (result) {
                        if (result.length > 0) {
                            _sampletabledata = $.parseJSON(result);
                            PoplulateListSample();
                            PopulateSampleCheckBox();
                            BindSampleGrid();
                            BindBoxesWithSet();
                        }
                    }, //success of ajax

            return false;

}

此代码返回错误500 。需要您的建议

0 个答案:

没有答案