TempChart Session issue on deployement server

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ArcUsers
Newbie
Newbie
Posts: 8
Joined: Mon Jan 16, 2006 12:00 am

TempChart Session issue on deployement server

Post by ArcUsers » Thu Apr 19, 2012 7:07 pm

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.

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

Re: TempChart Session issue on deployement server

Post by Sandra » Fri Apr 20, 2012 2:00 pm

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,
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

ArcUsers
Newbie
Newbie
Posts: 8
Joined: Mon Jan 16, 2006 12:00 am

Re: TempChart Session issue on deployement server

Post by ArcUsers » Fri Apr 20, 2012 2:10 pm

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.

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

Re: TempChart Session issue on deployement server

Post by Sandra » Fri Apr 20, 2012 2:38 pm

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,
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

ArcUsers
Newbie
Newbie
Posts: 8
Joined: Mon Jan 16, 2006 12:00 am

Re: TempChart Session issue on deployement server

Post by ArcUsers » Fri Apr 20, 2012 7:11 pm

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?

Marc
Site Admin
Site Admin
Posts: 1265
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: TempChart Session issue on deployement server

Post by Marc » Tue Apr 24, 2012 9:05 am

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
Steema Support

Post Reply