Jump to content
Software FX Community

Problem when caching chart in Session variable


User (Legacy)
 Share

Recommended Posts

I have a very puzzling problem. After I have create my chart, loaded the

template, set up the axes and populated it with data I save the chart object

in a Session variable as follows:

Session("chart") = ChartFx1

Each time a request is made to the web server the chart is updated and

re-displayed. Everything ok up to this point...

Then, if the user waits for 10 minutes and then makes another request to the

server the following message is displayed:

"QueryInterface for interface ChartfxLib.IChartFX failed"

Whilst attempting to perform the following line of code:

ChartFx1.Volume = 70

Any ideas?

Regards, Nick

PMG

Link to comment
Share on other sites

1) Your syntax is incorrect, to add an object to a session you must write:

set Session("chart") = ChartFx1

2) It is not a good idea to put a chart object in a session variable as

Chart FX is marked as "apartment-threaded". The following is an excerpt from

MSDN:

"Session scope objects: Objects marked Both will give you the best

performance. Using single-threaded or apartment-threaded objects will cause

the Web server to lock the session down to one thread. Free-threaded objects

do not lock down the session, but are slow"

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...