Page 1 of 1

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

Posted: Thu Jun 28, 2012 2:59 pm
by 15661479
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!

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

Posted: Thu Jun 28, 2012 3:01 pm
by 15661479
I should have said "is transforming '%16' to an strange character"

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

Posted: Tue Jul 03, 2012 4:35 pm
by 10050769
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,

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

Posted: Wed Jul 04, 2012 5:05 pm
by 15661479
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!

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

Posted: Fri Jul 06, 2012 9:22 am
by 10050769
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,

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

Posted: Fri Jul 20, 2012 7:40 pm
by 15661479
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.

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

Posted: Mon Jul 23, 2012 1:53 pm
by 10050769
Hello Hermes,

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

Thanks,