I am making the following jQuery ajax call for an asp.net mvc controller that works, however on the firebug console it seems to be executed three times. The first two times it returns 401 Unauthorized, and the last time it returns 200 Ok. Can anyone shed light on what happens when I make this request and how I can stop outgoing calls from failing.
$.ajax({ type: 'POST', url: '/Core/GetVariableSet', dataType: 'json', data: {}, success: function(response) { thisObject.Date = new Date(response.Date); thisObject.UserId = response.UserId; thisObject.UserName = response.UserName; }, error: function(XMLHttpRequest, textStatus, errorThrown) { Util.errorhandling.AJAXError($('#main'), 'Error Getting Variables', XMLHttpRequest, textStatus, errorThrown); } });
bobwah
source share