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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -