I did today search for session out of state on Microsoft site and found site
http://msdn2.microsoft.com/en-us/library/ms972429.aspx
However not studio 2005, nor Orcas can accept code
<configuration>
<sessionstate
Not in XP, neither in server 2003. It means that at least at this time I
cannot use this code. Probably the best solution is to reopen dataset each
time when I load new page. Probably also to keep this code in separate web
service which will return only datatable or datarow. As I remember from my
past experince web service cannot keep values when I go from one page to
another. This way I loose the essential of dataset.
I put attention to another thing. I put in the corner of screen task
manager, so I was able to watch how much memory I need. I used 2 pages.
First page plain asp code, second initialize dataset, can abandon session if
I want and to return to the first page. When I load first page the memory
grew up to 60mb. Second page sometimes added 2-5mb, sometimes nothing.
Memory reduced it size very rare. If I did long break between loading of
first page it could increase memory up to 10mb (Even i did not allocate
there any variable). This way I increse memory up to 130mb. The same code in
asp 1.0 takes only 14mb. It means that garbage collection does not work is
it suppose to be.
Eliyahu Goldin said:
Minimizing session using and disposing variables is an architectural
decision.
Out-of-process session management means using either a special Windows
service available in asp.net or a SQL Server database. Switching to the
Windows service is simple but you may need to put a [Serializable]
attribute on the classes you put into session..
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
Aleks Kleyn said:
Probably you are right. Do you mean that I need to try web service? Or
there are other ways also?
message Almost certainly the problem is in storing large amount of data in
session variables. See if you can minimize it. Another idea is to use
out-of-process session management.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
I wrote application on asp.net 2.0 using dataset. One dataset I put in
session collection and other (which is small and common for other users)
I put in application. I expected that it will get some amount of memory,
however I expected that this amount of memory will be fixed and will
depend on number of user. When I put code in production I discovered
that aspnet_wp.exe increases memory which it uses. Each second 2meg.
What may be the reason. I expected that when I load new page, every
variable that I use in old page releases memory. How I can find where I
did not release memory. I call each time 'Page unload' when I load new
page but never when I close it.