This is a migrated thread and some comments may be shown as answers.

Rad Chart imaging occasionally not loading

4 Answers 141 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Gerald K
Top achievements
Rank 1
Gerald K asked on 24 Oct 2008, 04:27 PM
I have a page that displays a pie chart using the Rad Chart control and occasionally the image of the chart is not loaded. This seems to be a timing problem because often it does work fine. I used Fiddler to find out what is happening and here is what I found:
The Rad Chart control gets rendered to an image tag with the source URL similar to the one below
<AppPath>/RadControls/Chart/Image.aspx?UseSession=true&ChartID=e4c892b6-906a-40ce-af05-80314f8103b4_chart_ctl00$MC$ConceptDisplay$ctl01$InteractionList$ctl00$ProfileGroupSplitRadChart&imageFormat=Png&random=0.973745745128834
I opened the page into several browser windows, some of which showed the chart correctly and some came up with the chart image missing. When I checked the image requests in Fiddler I saw that in cases where the image showed correctly the request obviously returned a PNG image and in the other cases it actually returned an error page. The error page never gets shown as these were source requests from an HTML image tag but Fiddler allowed me to inspect the content of that error page and it shows the error message “Error:  Specified argument was out of the range of valid values. Parameter name: offset”. This error is thrown from within the Rad Chart control’s Image.aspx file which is an empty aspx file without code behind that inherits from Telerik.WebControls.Dialogs.ChartImage.

All this suggests that there might be some timing issue where the chart image is not yet created or may not yet be saved to the session state when Image.aspx tries to access it. I have to add that the site containing this page with the chart is load balanced using Windows NLB. The session state is configured as following: <sessionState mode="SQLServer" … cookieless="false" timeout="60"/>.

Is there some simple trick to ensure that the chart image is created and saved to the session state before the browser can request it? For instance would it be possible to delay the rending of the page or the chart control by fractions of a second so that the browser cannot load the images before it is saved to the session state? Or are there any other suggestions to fix this problem?


4 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 28 Oct 2008, 12:03 PM
Hi Gerald,

Unfortunately, there is no way to ensure that the image is saved before it is requested by a browser. The chart image is retrieved by the session synchronously, so it is unlikely, that the

Looking at the error message I can see you use RadChart for ASP.NET (and not RadChart for ASP.NET AJAX). This error reminds of an error in RadChart versions prior to 2.8.2. However, it has been fixed and we have not had such reports since then. Can you specify the version of RadChart you are using? If it is prior to 2.8.2 - please, upgrade to this version and give it another try.

Regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Gerald K
Top achievements
Rank 1
answered on 30 Oct 2008, 12:25 PM
Thanks for your reply. It appears that we are using RadChart for ASP.NET AJAX and RadChart for ASP.NET for the particular site and you are right, that page is using RadChart for ASP.NET.

I upgraded the page to RadChart 3.0.2 (that's what the version information of the DLL says) but I still have the problem. In addition I also managed to repeat the problem on a single developer machine without load balancing but with SQL Server session state mode enabled. Therefore I am almost certain that the problem is related to the image being read before it has reached the session state store, i.e. SQL Server and version 3.0.2 does not seem to fix the problem.

Are there any other ideas or suggestions? Is there any way of ensuring that the rendering of the control is not completed before the image is available in the session state store? Or what other explanation exists for the offset parameter being out of range within the Telerik.WebControls.Dialogs.ChartImage instance when the image is requested by the browser?
0
Vladimir Milev
Telerik team
answered on 04 Nov 2008, 04:48 PM
Hi Gerald K,

Right now there is no mechanism to block rendering of the image before it is fetched from the SQL server. RadChart was intentionally designed to work asynchronously. I can suggest using a more responsive mode for storing images such as in memory or in case of web farm scenario a shared network file location.

We apologize for the inconveniences caused.

Regards,
Vladimir Milev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Gerald K
Top achievements
Rank 1
answered on 04 Nov 2008, 04:59 PM
Thanks a lot for your help. I subsequently found some code in our Web application that removes objects from the session in certain circumstances and this caused the problem. So the problem was not caused by the RadControl.

Thanks again for your replies.

Kind regards
Gerald
Tags
Chart (Obsolete)
Asked by
Gerald K
Top achievements
Rank 1
Answers by
Ves
Telerik team
Gerald K
Top achievements
Rank 1
Vladimir Milev
Telerik team
Share this question
or