HTTP / 1.1 500内部服务器发布到WEB API时出错

时间:2018-06-05 06:41:07

标签: asp.net-web-api asp.net-ajax

当我尝试POST到Web API时,我收到500 Internal Server错误。

链接为http://api.xxxx.com/LeadPurchaseOrder

{"leadItineraryID":"29","PRNumber":"Cheque","POAmount":"12","paymentMode":"1","POReceipt":"1001"} 

当我试图通过Fiddler发送它时,上面是请求正文。

 $.ajax({
        type: "POST",
        url: "http://api.xxxx.com/LeadPurchaseOrder",
        data: {
                "leadItineraryID": leadItineraryID,
                "PRNumber": travelPRNumber,
                "POAmount": POAmount,
                "paymentMode": paymentMode,
                "POReceipt": chellanDocument
              }
});

以上是ajax代码,我避免了contentType和dataType,因为我得到405方法错误。现在当我发布数据时,我得到500内部服务器错误。我正在研究.NET版本4,所以我想我无法实现CORS

0 个答案:

没有答案