i have error processing ajax request wcf service on client side,
self.remove = function (dep, processingresult) { var data = { "id": dep }; $.ajax({ url: 'my.svc/remove', type: 'post', contenttype: 'application/json', datatype: "json", cache: false, data: json.stringify(data), complete: function (e, xhr, settings) { var message = self.getmessage(e.status); switch (e.status) { case 200: processingresult(); break; case 417: console.log(e.statustext); radalert(message + e.statustext, null, null, "417"); break; default: { console.log(e.statustext); radalert(message, null, null, "bekey"); } } } }); };
in case return error 417, ie9 getting result 12019 error instead. other browsers including ie10 getting correct value.
why happens , how fix ?
12019 - error_internet_incorrect_handle_state requested operation cannot carried out because handle supplied not in correct state.
looks return code not practice. right ?
weboperationcontext ctx; //.... ctx.outgoingresponse.statuscode = system.net.httpstatuscode.expectationfailed;//417 //...
if clearing cache doesn't help, it's related how urlmon wraps http error status codes; instance ie9 , below convert http/204 response bogus 1223 status code (see http://www.enhanceie.com/ie/bugs.asp)
this problem fixed in ie10 such server's response status correctly returned script.
Comments
Post a Comment