Page 1 of 1

TempChart Session issue on deployement server

Posted: Thu Apr 19, 2012 7:07 pm
by 9639963
Good evening,

We've been troubleshooting a rather odd problem for the past few hours and have hit a dead end.

The issue is as follow: In our Developpement environnement and Quality insurance environement, our WebChart works brilliantly.

However, when deployed on our production envrionnement, the chart stops working and greets us with a nice red X.

We are using TeeChart v4.1.2012.
Our WebChart TempChart proprety is set to Session.
We have our Session enabled under IIS and in our Web.Config.
The GetChart.aspx is included in our project.

We cannot seem to find the issue at hand.
It's rather odd because the WebChart doesn't even try to call GetChart.aspx when in Session mode, it rather tries to access the _temp_chart_ folder at the root of the application, as if it was in file mode.
If we try to make it work in Cache mode, the WebChart gets called this time but unfortunatly it doesn't display our graph, but it's working all right in our other environement.

Here are the relevant code snippet:

GetChart.aspx.cs

Code: Select all

protected void Page_Load(object sender, EventArgs e)
{
    string chartName = Request.QueryString["Chart"]; 
    if (Session[chartName] != null) 
    { 
       	System.IO.MemoryStream chartStream = new System.IO.MemoryStream(); 
        chartStream = ((System.IO.MemoryStream)Session[chartName]); 
        Response.ContentType = "image/" + "png"; 
        Response.OutputStream.Write(chartStream.ToArray(), 0, (int)chartStream.Length); 
        chartStream.Close(); 
        Session.Remove(chartName); 
    } 
}
WebChart Config in aspx

Code: Select all

<tchart:WebChart ID="ChartProd" runat="server" AutoPostback="False" GetChartFile="GetChart.aspx" 
Height="700" OnLoad="ChartProd_Load" TempChart="Session" Width="1100" />
Web.Config

Code: Select all

 <system.web>
    <sessionState mode="InProc" />
     
     //...

 </system.web>

So my question is, what are the reasons for falling back into File mode when Session is clearly specified? What are we missing? We doubled checked every of our configuration in IIS with no success.

Much appreciated.

Re: TempChart Session issue on deployement server

Posted: Fri Apr 20, 2012 2:00 pm
by 10050769
Hello ArcUsers,

Can you tell us if you can run the Asp.Net Demo? So, need know if the problem is only for your application or too occurs when you try to run Asp.Net Demo. On the other hand can you check if Marc's said in this thread?

Thanks,

Re: TempChart Session issue on deployement server

Posted: Fri Apr 20, 2012 2:10 pm
by 9639963
We tried running the ASP.Net Demo and a Simple WebForm and both were having the same problems.

As for Marc's response, We both checked the Web Application and the Application Pool and both have Session enabled, is there somewhere else I should be looking into?

I'm still stuck on the fact that if I right click on the Red X, and look into Properties, that it tries to access the _temp_chart folder... I find this very odd.

Is there any check to see if he can use the Session mode, and if not tries to revert to File mode?

It's obviously a problem on our side with some configuration... But we spent an entire day trying to debug this and cannot seem to see the end of it.

Re: TempChart Session issue on deployement server

Posted: Fri Apr 20, 2012 2:38 pm
by 10050769
Hellor ArcUsers,

In this case, please following next steps to try to solve the problem:
1.- Open RegEdit
2.- Go to HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET\VirtualShare and check if there is /TeeChartForNET
3.- Go to HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET\ShareFolder and check if there is the path where you have installed TeeChartFor.Net 2012. If path isn't correct, please change it.
4.- Go to the Windows Control Panel\All Control Panel Items\Administrative Tools\Internet Information Services (IIS) Manager\Sites\Default Web Site\TeeChartForNET and go to Advanced Settings\Physical Path. Check if there is same path of ShareFolder. If path isn't correct please change it.
5.- Try again if your demo and application works. If it doesn't solve, please let me know.

Thank,

Re: TempChart Session issue on deployement server

Posted: Fri Apr 20, 2012 7:11 pm
by 9639963
We tried that and it made the Chart work in File mode.

Unfortunatly, we still wanted it to work in Session Mode.

After much tinkering, we managed to make it work. It was mostly Sharepoint's fault and had to keep putting stuff in our Web.Config file.

Now we're stuck because of one of our corporate filters scans the Query URL and reject unallowed query String.

Unfortunatly, GetChart?Chart=XXX causes problems, because this filter doesn't want the word "Char" in our query.

Is there a way to tell TeeChart to use another name for its Query String param?

Re: TempChart Session issue on deployement server

Posted: Tue Apr 24, 2012 9:05 am
by Marc
Hello,

Unfortunately the string "Chart" is hardcoded into the variable string. If you are a sourcecode customer you could modify it reasonably easily, otherwise there is no way with the current version of TeeChart to change it. We could put this down to be modified in the product itself but before we do so, because chart forms an intuitively useful part of the call string plus there are other keywords and where to start and where to stop, is there any way you could have the filter modified? (the filter could still catch 'char' but with a control character after it such as "[" or "(" or "$", etc, as would be required if it were to be used illicitly).

With thanks.
Regards,
Marc Meumann