I have a page that's throwing an "Invalid Argument" exception in Sys.Net.XMLHttpExecutor()
I can break at the error and examine the code, it's in the _onReadyStateChange() function:
1 this._onReadyStateChange = (function () {
2
3 if (_this._xmlHttpRequest.readyState === 4 ) {
4 try {
5 if (typeof(_this._xmlHttpRequest.status) === "undefined") {
6 return;
7 }
8 }
9 catch(ex) {
10 return;
11 }
12
13 _this._clearTimer();
14 _this._responseAvailable = true;
15 try {
16 _this._webRequest.completed(Sys.EventArgs.Empty);
17 }
18 finally {
19 if (_this._xmlHttpRequest != null) {
20 _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
21 _this._xmlHttpRequest = null;
22 }
23 }
24 }
25 });
The debugger break's on the "finally" line 18 of the listing above, which is line 4723 of MicrosoftAjax.js.
From what's available in the debugger, examining the variables, the call stack, etc., I've not been able to identify what the problem is. I've stepped through the code-behind, and it seems to be completing without error. It runs through Page_Load() and Page_PreRender() with no complaints, then up pops "Invalid Argument" on this line of javascript.
Any ideas on how to track down where the problem lies?