|
C# AJAX Stopping Zoom and Scroll From Working |
Posted by Eddy Glaister on Mar-27-2014 23:06 |
|
Hi there,
I have an urgent issue I was hoping you could help me with.
I am getting the attached error when attempting to use the zoom and scroll function.
Why is this error caused?
Thanks
|
Re: C# AJAX Stopping Zoom and Scroll From Working |
Posted by Peter Kwan on Mar-28-2014 16:51 |
|
Hi Eddy,
The error means the browser has requested the server to update the chart. Like all other
requests to the server, the request is by using HTTP with a URL. The server thinks the
URL is not valid and returns the error message you see.
For the above error, ChartDirector on the server is not involved, as the server cannot
even understand the URL and determine which ASPX code or component to use. To
troubleshoot the problem, we need to determine what is the URL, how it is generated,
and why the server thinks it is invalid. The server log file should contain the URL of every
requests the server received. Is it possible to determine what is the URL that caused the
error from the server log file?
In ChartDirector AJAX request, the URL should be generated by the ChartDirector
Javascript library on the browser side. Please try the ChartDirector zooming and scrolling
sample code to see if it works in your system. If the sample code works, the possibilities I
can think of are:
- The ChartDirector Javascript does not handle some additional data used in your
application correctly (such as custom attributes), and generates an invalid URL (such as
a URL containing some characters forbidden in URL).
- Your application may have some other Javascript library that modifies the URL
generated by ChartDirector. Many AJAX frameworks can modify a lot of things
unexpectedly.
- The URL is correct and valid as according to the HTTP standard, but the web page you
are using requires the URL to be in a special custom format (eg. because it is using some
special web framework).
Please kindly let me know if the sample code works in your system, and the URL that
causes the error. If you cannot determine what is the URL, I would need to send a debug
version of the ChartDirector Javascript library to you to log the URL on the browser side.
Regards
Peter Kwan |
Re: C# AJAX Stopping Zoom and Scroll From Working |
Posted by eddy glaister on Jun-24-2014 17:49 |
|
Hi
Just to let you know if was a URL rewriting issue.
Thanks for your help and extremely detailed replies.
Eddy |
Re: C# AJAX Stopping Zoom and Scroll From Working |
Posted by Eddy Glaister on Apr-10-2014 16:51 |
|
Hi again,
Thanks once again for your extremely detailed response.
I have found the following in the IIS Error Log. This is the url that is failing when trying to
zoom on the chart.
Doesn't mean much to me, but may to you. Is this of any help in tracking down the
problem?
Note: comparestations.aspx is the page where my chart is placed.
2014-04-10 08:43:47 127.0.0.1 63146 127.0.0.1 80 HTTP/1.1 GET
/comparestations.aspx&cdLoopBack=1&cdPartialUpdate=MainContent_MainContent_Stations
_DataSearch1_WebChartViewer1&cdCacheDefeat=1397119427815&MainContent_MainConte
nt_Stations_DataSearch1_WebChartViewer1_JsChartViewerState=0*40%1E1*58%1E2*790
%1E3*400%1E4*0.18032041139240507%1E5*0%1E6*0.22784810126582278%1E7*1%1E8*
2%1E9**%23000000%1E10*3%1E11*0%1E12*0%1E13*2%1E14*0.5%1E15*0.05%1E16*1
%1E17*0.01%1E18*1%1E19*5%1E23*1%1E24**x_max**63530935200%1Fx_min**635301
20700%1E25*1?Token=7f914714&RequestId=54376c53 400 - URL - |
Re: C# AJAX Stopping Zoom and Scroll From Working |
Posted by Peter Kwan on Apr-10-2014 23:11 |
|
Hi Eddy,
The URL in your IIS Error Log is in fact invalid. There are two issues:
(a) The followings are appended to the end of the URL:
?Token=7f914714&RequestId=54376c53
(b) The delimiter between the ASPX page and the query parameter is '&' instead of '?'
(A valid URL should be like "/comparestations.aspx?....." but the log shows
"/comparestations.aspx&.....".)
The "Token=7f914714&RequestId=54376c53" does not come from ChartDirector. Are you
aware where does these parameters come from? Also, is the URL as shown in your
browser address bar being "comparestations.aspx" (without query parameters), or is it
something like "comparestations.aspx?Token=7f914714&RequestId=54376c53".
I suspect there may be some other AJAX framework or URL rewriting system in your page
or web server that modifies the URL. One theory is that the URL generated by
ChartDirector is:
/comparestations.aspx?Token=7f914714&RequestId=54376c53&cdLoopBack=1......
But then some other framework modifies the URL to:
/comparestations.aspx&cdLoopBack=1.........?Token=7f914714&RequestId=54376c53
(The original "?Token=....&Request=...." is deleted and a new "?Token=....&Request=...."
appended to the end.)
To confirm if the above is the case, ChartDirector stores the URL to be used in a hidden
field in the HTML. You may right click on the ASPX page on your browser, and select
"View Source" to view the HTML source. You can then search for the keyword
"_callBackURL". This should lead you to a hidden field of which the value is the URL. A
typical value is "/comparestations.aspx?
Token=7f914714&RequestId=54376c53&cdLoopBack=1" or "/comparestations.aspx?
cdLoopBack=1". The important part is that the character after "/comparestations.aspx"
should be "?" instead of "&".
You can also save the HTML source and attach it to your message of email to me
pkwan@advsofteng.net so I can analyze it.
Are you aware is there any framework or IIS module that may use the parameters "?
Token=7f914714&RequestId=54376c53"?
You mentioned in your other post that the sample code that comes with ChartDirector
seems to work. Is it possible to modify the sample code to make it showing the same
problem (eg. by adding any AJAX framework that you may be using)? This may help to
identify the cause of the problem.
It should be OK for an AJAX framework to modify the URL, but it should modify it
according to the standard. In your case, for some reasons, the URL seems to be modified
in a way that is invalid.
Regards
Peter Kwan |
|