Request.QueryString["Chart"] different to Session key

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Request.QueryString["Chart"] different to Session key

Post by Hermes » Thu Jun 28, 2012 2:59 pm

We are using charts with TempChart set to Session but we are having some trouble because even tought query string "Chart" value is WebChart1fe80d912884e1cd11792%16634764784090241001png but when accessed via Request.QueryString["Chart"] is transforming to an strange character and thus Session[chartName] is null.

Already checked in Session and a key "WebChart1fe80d912884e1cd11792634764784090241001png" does exist. The code we are using for GetChart.aspx is the recommended one:

Code: Select all

public partial class GetChart : System.Web.UI.Page
			{
				protected void Page_Load(object sender, System.EventArgs e)
				{
					// *************************************************************
					// Code to retrieve Session saved streamed Charts to a WebForm.
					// This code should be included if the WebChart 'UseStreams' property is set to True.
					// *************************************************************

					string chartName=Request.QueryString["Chart"];

					if (Session[chartName]!=null)
					{
						MemoryStream chartStream = new MemoryStream();
						chartStream=((MemoryStream)Session[chartName]);
						Response.OutputStream.Write(chartStream.ToArray(),0,(int)chartStream.Length);
						chartStream.Close();
						Session.Remove(chartName);
					}
				}
}
Any hints?

Thanks!

Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Re: Request.QueryString["Chart"] different to Session key

Post by Hermes » Thu Jun 28, 2012 3:01 pm

I should have said "is transforming '%16' to an strange character"

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Request.QueryString["Chart"] different to Session key

Post by Sandra » Tue Jul 03, 2012 4:35 pm

Hello Hermes,

I can not reproduce your problem with next project. Please check if you use my attached project your problem appears.
WebSite2.zip
(7.17 KiB) Downloaded 472 times
Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Re: Request.QueryString["Chart"] different to Session key

Post by Hermes » Wed Jul 04, 2012 5:05 pm

Couldn't reproduce the problem on that project, but what I see is that the "wrong" chartName is almost twice as long as the normal one (when there is no error) besides contains a '%' what may cause something like that?
I ask this as it may be a bit difficult to isolate the problem from the whole project, so may be we can get any hints while I try to isolate the problem in order to upload it.

Thanks!

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Request.QueryString["Chart"] different to Session key

Post by Sandra » Fri Jul 06, 2012 9:22 am

Hello Hermes,

I can not reproduce your problem using last version of TeeChart.Net. Can you tell us which version are you using? On the other hand, would be very helpful for us if you can try to arrange a simple code so we can try to reproduce the problem here.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Hermes
Newbie
Newbie
Posts: 33
Joined: Fri Feb 03, 2012 12:00 am

Re: Request.QueryString["Chart"] different to Session key

Post by Hermes » Fri Jul 20, 2012 7:40 pm

We are using 2012 4.1.2012.02280. We haven't been able to isolate the problem :S it is quite strange. Anyway with it seems not to happen anymore. We will do some more testing and come back to you if we find any other lead.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Request.QueryString["Chart"] different to Session key

Post by Sandra » Mon Jul 23, 2012 1:53 pm

Hello Hermes,

Ok. If you have any problems, please let me know.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply