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

Telerik Chart- Image not displayed in load balanced environment

12 Answers 224 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
ARUNABH
Top achievements
Rank 1
ARUNABH asked on 03 Jun 2009, 12:07 PM
As i see during the creation of RadChart i am nowhere required to write the created graph image in my app directory. So i assume that it is writing the image in the temp directory before displaying it under some control... lets  say in a panel. Now the problem i am facing is that in a load balanced environment sometimes the graph is not getting displayed.

--If someone can help me understand the internals like how the image is created and at what step it is disposed. It will help me analyze the issue in load balancer scenario. The error is not there always, so the information can help me understand if load balancer is villain in the play.

12 Answers, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 05 Jun 2009, 08:24 AM
Hello Amit,

When RadChart is placed in a load balanced environment, there could be an issue if the page is served  and therefore the chart image is generated by one machine and the next request for the image itself is served by another machine. Then this second machine will not be able to find the image in the session. The solution would be to implement State server or SQL server session state mode or sticky sessions, ensuring that all the requests from one user will be handled by the same server.

Hope that helps.


Kind regards,
Velin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ARUNABH
Top achievements
Rank 1
answered on 05 Jun 2009, 09:33 AM
Thanks for your suggestion Velin. While analyzing the http request for that page i found that there are two calls to the Temp folder where the image(chart) is created to load the image. Can we make it a single call??
I understand that if we have to work with only inproc session mode we will have to go for sticky session. It is a not frequently adopted option.

Thanks,
Amit
 
0
Velin
Telerik team
answered on 08 Jun 2009, 11:11 AM
Hi Amit,

Normally, the chart image should be requested only once and this is the behavior we encounter on our end. Since, this has not been reported to us previously, at this time we can not suggest you a feasible solution.
The control will be tested additionally in attempt to reproduce the problem and in the meanwhile any further implementation specific information will be appreciated.

Thanks.

Sincerely,
Velin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ARUNABH
Top achievements
Rank 1
answered on 09 Jun 2009, 06:42 AM
Hi Velin,

Is it possible to put the Temp folder on a shared drive which is accessible to all the servers in the cluster?

If we can make it, then without sticky sesssion also we can resolve this issue. I feel that we are no where using configuration item which is pointing to the temp folder which is currently a part of the aplication directory itself. There is a page "Image.aspx" under /RadControls/Chart which is used for making an http call to read the image from the Temp directory. So i assume it is taken care by the Telerik dlls internally. So if it is possible to put Temp folder on the shared drive .. how we are going to read that using this Image.aspx page. I could not find any guideline in your help docs. Can you please provide some detail on this??

Thanks,
Amit
0
Velin
Telerik team
answered on 12 Jun 2009, 11:48 AM
Hi Amit,

Unfortunately, it is not possible to configure a RadChart Temp folder not residing within your application directory due to security restrictions imposed on behalf of the charting control.

I've forwarded your idea to our developers who will research this scenario and implement it if applicable. And in the meanwhile you should go for some kind of sticky session or SQL Server Session State Mode.


Greetings,
Velin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ARUNABH
Top achievements
Rank 1
answered on 12 Jun 2009, 12:10 PM
Thank you Velin for clearing the doubts. I am saying this because i tried exploiting the property "TempImagesFolder" of the RadChart to set the path(a UNC path for a shared folder residing on a different server.). It did not work even after setting the required permission for the ASPNET account and my account on that folder. It would be of great help if you say something about this property.

Thanks,
Amit
0
Velin
Telerik team
answered on 17 Jun 2009, 03:22 PM
Hi Amit,

This property defines where the chart image will be stored if UseSession property is set to false. Here is a list of things you can do to achieve this behavior:
  1. Map a shared folder as a virtual path to all of the IIS instances running.
  2. Give read/write permission to this folder for the following users aspnet, iusr_MACHINENAME on all the servers.
  3. Set UseSession property of RadChart to false
  4. Set the TempImagesFolder property of RadChart to the virtual path from step 1.

Hope this will help.
Greetings,
Velin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
brian hitney
Top achievements
Rank 1
answered on 08 Feb 2010, 02:32 AM
Hi Telerik--

It would be useful if the chart could write to an absolute and not virtual path (on Windows Azure, for example).  Even better would be to save to a bitmap object for easier uploading to Azure storage...

Brian
0
Velin
Telerik team
answered on 10 Feb 2010, 03:42 PM
Hi brian hitney,

RadChart already exposes a Save method which allows you to export the chart image to file or stream object. As it concerns to writing to an absolute path, our developers did not implement this option intentionally due to the security threats it leads to. 

Regards,
Velin
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
brian hitney
Top achievements
Rank 1
answered on 10 Feb 2010, 04:11 PM
Was the save to stream option implemented recently?  Can you tell me which version it was implemented in?  I may need to upgrade.

Regarding this:
 " As it concerns to writing to an absolute path, our developers did not implement this option intentionally due to the security threats it leads to.  "

Honestly, I don't think that's valid and here's why:  currently, I can call Save() on a chart and pass in an absolute path to any folder I like, provided I have write permissions to that folder.  (Unless you changed that in a newer version...)  The only location where I cannot use an absolute path is on the temp folder property, which is presumably doing much of the same thing.   Unless both are restricted, the "threat" is still there.

Besides, though, there are very valid reasons why you might need a temp folder outside the root of the web app.  I would first need to configure my app to explicitly allow the user (or app pool identity) access to such a folder (which would require explicit action on the part of the administrator) and once in place, the app has such permissions and so that's where the real "threat" might lie, not in the component exactly.  It's not always possible to create a virtual path. 

Like I said, I can still write the file by calling Save() to any path the account has access to.  Or save to a stream and save it wherever I'd like... as a developer it's easy to work around but unnecessarily complex.

On Windows Azure, for example, all local storage that the user has access to is outside the root and isolated.  I wanted to configure the charts to not use session state, but my temp folder must reside outside the root.  This forces me to call Save() to this location, and then write my own handler to return the image.  The net effect is the same.
0
Velin
Telerik team
answered on 12 Feb 2010, 04:39 PM
Hello brian hitney,

The option to export the RadChart image to stream is not a newly implemented one. In case you do not have it with your version of the control you can simply upgrade to the latest version.

If you need more information about the security threats mentioned in the previous posts, please, create a new support thread.

Greetings,
Velin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Dave Messinger
Top achievements
Rank 1
answered on 05 May 2010, 04:32 AM
I am having the same issues.  Is there any chance of seeing an example of RadChart working on WindowsAzure in a webrole?
Tags
Chart (Obsolete)
Asked by
ARUNABH
Top achievements
Rank 1
Answers by
Velin
Telerik team
ARUNABH
Top achievements
Rank 1
brian hitney
Top achievements
Rank 1
Dave Messinger
Top achievements
Rank 1
Share this question
or