Ok, so I have a .NET application that uses the Prototype library to call AJAX for web methods on the page to get the data. This application has been running for quite some time, no problem. Recently, a new user started using the app and experienced some strange problems.
Basically, he can use the application perfectly for a while, and then he just starts throwing errors in AJAX. Here is the error:
System.InvalidOperationException - Unable to perform the requested action: Invalid web service call, missing value for parameter: 'fleet'. at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary'2 parameters) at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary'2 parameters) AT SYSTEM.WEB.SCRIPT.SERVICES.RESTHANDLER.INVOKEMETHOD(HTTPCONTEXT CONTEXT, WEBSERVICEMETHODDATA METHODDATA, IDICTIONARY`2 RAWPARAMS) at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)
This is not just one call, which is a mess, but any case of ajax is randomnly, and it always seems to be the first parameter in a web method called โmissingโ. making me believe that the data in the messages is not returned in any way? (related ? : JQuery Ajax message options are sometimes not sent to IE ).
I could never recreate this problem, and no one else experienced it. This makes me think that this is something special in this user system that is causing the problem. Unfortunately, they are a pretty important user, so I need to try to solve this problem. IE8 user has a browser. Here is the code that makes an ajax call using the prototype:
function gAjax(url, params, onSuccess, onError, onException, onComplete) { new Ajax.Request(url, { method:'post', //Post contentType:"application/json; charset=utf-8", //As JSON postBody:Object.toJSON(params), //Post Body is JSON string sanitizeJSON:true, //Sanitize the JSON onComplete:onComplete, //Set user on complete onSuccess:onSuccess, //Set user on success onFailure:onError, //Set user on error onException:onException //Set user on exception }); }
onComplete, onSuccess, onError, onException are function callbacks. params is an object like the following:
{'fleet': 'fleetVal', 'bean': 1234}
Url is a method such as Bin.aspx / LoadBinInfo. This method is defined in the backend as follows:
<System.Web.Services.WebMethod()> _ Public Shared Function LoadBinInfo(ByVal fleet As String, ByVal bin As Integer) As Dictionary(Of String, Object) '..... 'Returns a dictionary of info End Function
If anyone has any ideas as to what is going on, I would really appreciate any input! I can not find any information in my studies to lead me to a possible reason. Again, it seems that this happens with only one user, so itโs possible that his browser setting is at its end (any ideas, what settings?). But then again, itโs even sporadic for him, but as soon as it starts to happen, it happens all the time, until he closes the browser and starts.