jquery ajax call for asp.net mvc application getting two unauthorized reponses then Ok -
i executing following jquery ajax call asp.net mvc controller works, on firebug console seems getting executed 3 times. first 2 times returns 401 unauthorized , final time return 200 ok. shed light on happening when make request , how stop inital calls 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); } });
i noticed happening me when debugging in firefox. fix found add site 'network.automatic-ntlm-auth.trusted-uris' list in firefoxs about:config.
be sure include port if it's local development server causing problems.
Comments
Post a Comment