I’m building an MVC application which uses Windows Authentication. I want to handle a dropdownlist change event by making a post to the server with Jquery post.
Below is the Controller method I want to invoke:
[HttpPost]
public JsonResult UpdateConversion(int conversionId, int? conversionStandardId)
{
// Some statements here
}
And below is the javascript function that handles the onchange event of the dropdown:
function onConversionValueChange() {
var input = $(this);
var conversionId = input.attr('id').replace('ConversionFor', '');
var selectedValue = input.val();
if (selectedValue == '') {
$.post(Conversions._UpdateConversionURL, { conversionId: conversionId }, onConversionValueChanged);
}
else {
$.post(Conversions._UpdateConversionURL, { conversionId: conversionId, conversionStandardId: selectedValue }, onConversionValueChanged);
}
}
I don’t think there’s something wrong with these methods, because when I load the page initially and do the change the post call works several times. But after a while, it calls the post 3 times in a single event and returns 401 unauthorized error on all of them. Although the third call seemed to be successful.

Anyone can help me with this? Thanks.
That’s exactly how Windows Authentication (NTLM) works. It’s a challenge/response authentication scheme where the client sends a request, the server challenges the client to prove that he has the correct credentials by generating a nonce, and then the client authenticates. You can read more here: http://www.innovation.ch/personal/ronald/ntlm.html
Normally once authenticated the user agent should not need to go through all the phases on subsequent requests and should directly be able to send the authentication credentials.