This issue is only happening with the current version of Safari on Mac. (Older versions of Safari may be affected, but are not needed for this)
A generic 500 error is getting returned every time for Safari only.
There is a problem with the resource you are looking for, and it cannot be displayed.
All other browser I can test with return successfully having data be the expected chunk of HTML to display.
Here is my ajax call.
$.ajax({
async: true, //Added based on internet suggestions
type: "POST",
url: '../Provider/SaveAddress',
data: buildAddressJsonData(),
contentType: 'application/json; charset=utf-8',
success: function (data) {
$("#result").html(data);
},
error: function (xhr, ajaxOptions, thrownError) {
DisplayErrorMessage(xhr, ajaxOptions, thrownError);
}
});
I added in async: true
based on some others saying that fixed the problem. I even tried modifying the response serverside with HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin","*");
as that was also suggested.
I've also confirmed that buildAddressJsonData()
is providing proper json, here is an example.
{"IsRequired":"1","AddressIndex":"1","AddressLine1":"IBM","AddressLine2":"123 Upper St","AddressLine3":"Unit 14","City":"My Town","Id":"481c40d3-4a38-492b-880e-33b16021fb69","Lk_AddressTypeId":"d2316e7e-b2df-4274-9757-1ae5aa171f68","Lk_CountryId":"13c9fb13-8f50-438e-890a-63e6f1f4cd29","Lk_StateId":"0894fa8a-8d6b-43fc-89ec-e16ba915b6a4","SendMail":1}
This is all housed in an ASP.Net MVC5 application
None of these appear to make any change.
Edit: I'm told the server logs don't appear to show anything, but that may be by configuration (I don't have access to them)