.NET Framework Bookmark and Share   
 index > Chart Controls for .NET Framework > ChartHttpHandler problem concurrency
 

ChartHttpHandler problem concurrency

Hi,

I created a website where I have a chart that is generated dynamically according to user information.

I configured the chart with ImageStorageMode = "UseHttpHandler" the problem is that the ID is generated is not unique, 5-7 to make requests to the server (ChartImg.axd) overwrites the images. Example:

User 1, generated url: ChartImg.axd?i=chart_1c564444b4a743489506139f3d9b5ce0_1.png&g=0deaa777d76843ac98e9c2bd05aee6db
User 2, generated url: ChartImg.axd?i=chart_1c564444b4a743489506139f3d9b5ce0_2.png&g=0deaa777d76843ac98e9c2bd05aee6db
User 3, generated url: ChartImg.axd?i=chart_1c564444b4a743489506139f3d9b5ce0_3.png&g=0deaa777d76843ac98e9c2bd05aee6db
...
User 7, generated url: ChartImg.axd?i=chart_1c564444b4a743489506139f3d9b5ce0_1.png&g=0deaa777d76843ac98e9c2bd05aee6db

If the user 1 Refer to the URL after the request of the user 7, the generated image will be returned to the user 7.
You can use the keyword # UID with ImageStorageMode = "UseHttpHandler? how can I control return ChartImg.axd id?

A greeting and pardon my English.

  •  
CarpeTec
Hello,
It is not that simple.
- The "1c564444b4a743489506139f3d9b5ce0" above is a process identifier. For file storage mode you will see 1,2,3,4 - as process enumerator id.
- The "g=" parameter in the url is different for each request and is used as part of the privacy protection.
- If the privacy protection is enforced ( on by default) only the user generated the chart image can download it. Each image have encrypted privacy marker attached which have to match with user credentials, session ID or anonymous ID, otherwise the user will see broken image.
- The "_1,_2,_3" which you noticed is a counter (ID) in the images buffer which tracks the image live span and usage. The counter id is considered as free if
1) The user is downloaded the image and image is deleted from the images buffer (deleteAfterServicing flag in chart settings).
1) The time to live of this image is out.

Shortly, if privacy protection is enforced, it is not possible user 2 to get the image generated from user 1. If is not enforced, then user 2 cannot have the image url of user 1 until the user 1 downloads the image, or the image is in timeout.

Hope this helps,
Delian
DelianT
Hello,
It is not that simple.
- The "1c564444b4a743489506139f3d9b5ce0" above is a process identifier. For file storage mode you will see 1,2,3,4 - as process enumerator id.
- The "g=" parameter in the url is different for each request and is used as part of the privacy protection.
- If the privacy protection is enforced ( on by default) only the user generated the chart image can download it. Each image have encrypted privacy marker attached which have to match with user credentials, session ID or anonymous ID, otherwise the user will see broken image.
- The "_1,_2,_3" which you noticed is a counter (ID) in the images buffer which tracks the image live span and usage. The counter id is considered as free if
1) The user is downloaded the image and image is deleted from the images buffer (deleteAfterServicing flag in chart settings).
1) The time to live of this image is out.

Shortly, if privacy protection is enforced, it is not possible user 2 to get the image generated from user 1. If is not enforced, then user 2 cannot have the image url of user 1 until the user 1 downloads the image, or the image is in timeout.

Hope this helps,
Delian
DelianT

You can use google to search for other answers

Custom Search

More Threads

• why Chart control not showing all points labels on x-axis
• Multiple cursors
• The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) Word interop on RE-open
• DataManipulator.InsertEmptyPoints Does it work?
• Does the install touch the .Net framework?
• Pie Chart ToolTip Not Working Need Help
• Data given to the MS Chart Control is (0,0), but still it do not plot it at proper location.
• Display percentage and value in data labels?
• Cross-Table Data Binding
• I need some example for pie chart except miscrosoft windows chart example.