Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ASP.NET WaveFormPlot broken web image

I have been trying to increase the speed of a C# ASP.NET web site that has many WaveFormPlot charts.

When I configured the IIS Web Site's Application Pool to have more than 1 worker process on Windows Server 2003, I started seeing
broken image links for the Chart controls.  This problem is about 50% of the time.

When I reconfigure the worker processes to be only 1 for the web site Application Pool, the problem goes away.

Is there a ImageStateHandler issue when dealing with multiple Application Pools?

Thoughts?

Thank you,
Michael
0 Kudos
Message 1 of 3
(3,323 Views)
There is a property called ImageStateManagement on the graphs that controls where the image is stored. By default it is stored in the Session state but can also be stored in the Cache. Session state by default is in-proc. Cache is always in-poc. So when ImageStateManagement is set to SessionState, the image is stored in memory in the process.
 
You are setting up a Web Garden by having more than one worker process on the same machine. If the request happens to go to the process where the image is stored then you get the image back. If it happens to go to the other process where the image is not stored in memory you get a broken image. This is just classic state management issues with ASP.NET. See : http://msdn2.microsoft.com/en-us/library/ms225480(VS.80).aspx
 
Now, this issue can be solved by moving the Session State to an out-of-proc model. With a few ASP.NET config changes you can set it up so that all Session state is written to a SQL database for instance. This is fairly easy to do and already built in. There is also a WindowsService that can be used to store Session state.
 
If you want to do something more custom you can persist the image to whatever place you want. The code is easily extensible. For example, saving to the file system.
 
Brock
 
 
0 Kudos
Message 2 of 3
(3,315 Views)
breeve--
 
Thank you for reminding of the session state issues.  During Development, dev studio uses its little development server totally hiding you from this fact.
 
I have changed to the web.config to be <sessionState mode="StateServer" ... /> and all images appear to be working with IIS now.
 
Side note for NI:
Maybe there can be an additional help page in the user manual discussing these facts.  Maybe a "Best Configuration" example or something.
 
 
Thanks again
 
Michael
0 Kudos
Message 3 of 3
(3,310 Views)