views:

41

answers:

1

I am making an ajax call with jquery like:

$.ajax({
    url: "path/to/webservice.asmx"
    beforeSend: function(xmlHTTPRequest) {
        //modify headers here
        //remove cookies
    }
    success: function() {
        //do stuff 
   }
}

What I would like to do in the beforeSend function is take the incoming xmlHTTPRequest variable that is set and modify the headers to remove the cookie object that is in there, so in the call to my web service, it does not renew forms authentication in asp.net

A: 

Try

xmlHTTPRequest.setRequestHeader("Cookie", "");
Adam
Thanks Adam, this is what i needed.
lslow00
I've got another crappy error. Now that i've removed the cookie, the ajax call is returning an error stating 12150, Unknown as the status, statustext. I need to access the web service free of cookies so that i can not have the asp.net authentication renewed or the session renewed.
lslow00