I have created an jquery ajax call and it is working fine in Chrome, firefox and IE.
Where as in Safari, it is giving 500 internal server error in the response. I though it could be due to an exception from Server. But when i tried debugging, i found that it is not hitting the server at all.
The wierd thing in this is, the ajax-call works for every alternate calls. Call-1 fails and then call 2 succeeds.

Am attaching the screen shot of the request and response(both success and error). Please help me to fix this problem.
Thanks in advance,
Raghav
var coId = globalObject.GetCompanyIdFromUrl();
if ($("#headerCompanyMenu").length > 0 && coId != "") {
var strData = "{\"coId\":\"" + coId + "\"}";
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
cache: false,
url: globalObject.rootPath + "search/webmethod.aspx/GetCoHeaderData",
data: strData,
async: true,
success: function (d) {
var coHeaderData = JSON.parse(d);
$("#lblCoNm").html(coHeaderData.lblCoNm);
$("#lbl_prim_im").html(coHeaderData.lbl_prim_im);
$("#lbl_prim_md").html(coHeaderData.lbl_prim_md);
$("#lbl_prd_own").html(coHeaderData.lbl_prd_own);
$("#lbl_geo_own").html(coHeaderData.lbl_geo_own);
$("#lbl_org_inv").html(coHeaderData.lbl_org_inv);
$("#lbl_out_inv").html(coHeaderData.lbl_out_inv);
$("#lbl_cur_val").html(coHeaderData.lbl_cur_val);
$("#lbl_nbv").html(coHeaderData.lbl_nbv);
$("#lbl_fv").html(coHeaderData.lbl_fv);
$("#lblProc").html(coHeaderData.lblProc);
$("#lblFinGrd").html(coHeaderData.lblFinGrd);
if (coHeaderData.addNewDeal == "true")
$("#lnkAddNewDeal").show();
if (coHeaderData.coDeals.length > 0) {
BindData("coDealsTmpl", coHeaderData.coDeals);
$("#coDeals").show();
}
},
error: function (error) {
//alert("Company search error");
}
});
Am running the safari from Win7.
The actual Mac’s safari loads it perfectly fine. No errors for ajax call.
The server is windows 2008, running iis 7. No loadbalancing servers. Each time the ajax-call is hitting the same server same method, with same input-data and expects the same output data.
I would say that the reason the call is failing is because of a bug in Safari when working with Windows Authentication under IIS. Go to the Authentication settings of your website. Right click on Windows Authentication, choose providers and remove Negotiate, leaving NTLM which works fine. I haven’t tested Kerberos.
This issue only appears in certain builds of safari.