Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / February 2005

Tip: Looking for answers? Try searching our database.

Session problems in IIS6/Windows2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dwenwa@companyabc.com - 21 Jan 2005 17:39 GMT
Hi,

I have an ASP.NET application functioning properly on Windows 2000 server
and built using Visual Studio 2003.  The application saves in the Session
Object DataView objects, instances of Classes, and the ViewState - as well as
name=variable combinations.  The SessionState is defined as InProc.

We are upgrading our servers to Windows 2003 server.  As I start testing the
application on Windows 2003 server, I am noticing that the server is dropping
certain Session objects intermittently.  However, the "ASP.NET_SessionId" is
consistently the same throughout one browser session.

This is a single server not clustered.

I have read through other postings where the recommendation is to use
StateServer for the SessionState.  The work involved with serializing all of
the objects would be quite an effort.  I am thinking the whole caching model
of my application would need to be redesigned in order to fit in a new model.

1. Are there any known bugs in IIS6/Windows 2003 with Session that exhibit
this behavior?
2. Assuming no bugs are reported.  Because IIS was rewritten in IIS6, did
the caching model change for Session to cause this problem with my
application?
3. Assuming a workaround is needed, which of the caching models would you
recommend?

Your input is greatly appreciated.  Thank you.

Dave
Ben Strackany - 21 Jan 2005 18:32 GMT
Check the number of processes for your Application Pools. If your app pools
are using more than one process, you might "randomly" loose session objects.

For more info:
http://www.developmentnow.com/blog/2005/01/randomly-loosing-session-state-on-iis.aspx

Signature

Ben Strackany
www.developmentnow.com

> Hi,
>
[quoted text clipped - 26 lines]
>
> Dave
dwenwa@companyabc.com - 21 Jan 2005 20:57 GMT
Ben,

Thank you for getting back to me so quickly.  I checked the configuration of
the application pool.  Under the "web garden" section of the Performance tab,
it says "Maximum number of worker processes = 1".

One additional item to note.  I have two websites and eight virtual
directories configured in this application pool.

Dave

> Check the number of processes for your Application Pools. If your app pools
> are using more than one process, you might "randomly" loose session objects.
[quoted text clipped - 39 lines]
> >
> > Dave
dwenwa@companyabc.com - 25 Jan 2005 15:45 GMT
Ben,

I am such an idiot.  I ran some tests displaying a value from the Session
object.  It would appear, disappear, then reappear.  So the Session object
was not getting reset.  The behavior implied that it existed in a particular
section of memory managed by a worker process.

After closer examination, I found that I was looking at the properties of
the wrong application pool in my initial response.  The application pool
configured for the website was set to 5 worker processes.

This explains the behavior I saw.  Depending how many times I click the
refresh button, I would get a different worker process.  When I hit the
worker process with the Session object, it would appear.  Otherwise it would
the value for the Session object would not appear.

Setting the worker processes to 1 resolved the problem.  Obviously using a
different SessionState like SQL Server or StateServer would also have
resolved the problem.  But I didn't want to go through and serialize all of
my objects before saving them.

Is there any way that this little tip can be added to online help for a
future release?  It's isn't documented anywhere.

Thank you for your assistance.

Dave

> Ben,
>
[quoted text clipped - 50 lines]
> > >
> > > Dave
Ben Strackany - 07 Feb 2005 19:25 GMT
Hi Dave, glad to hear my tip helped.

As far as it being online somewhere, I think it's buried somewhere in MSDN
about the Cache or Session object. Not sure if it's in IISfaq, tho.

Signature

Ben Strackany
www.developmentnow.com

> Ben,
>
[quoted text clipped - 39 lines]
> > >
> > > For more info:

http://www.developmentnow.com/blog/2005/01/randomly-loosing-session-state-on-iis.aspx

> > > > Hi,
> > > >
[quoted text clipped - 33 lines]
> > > >
> > > > Dave
annie3 - 21 Jan 2005 21:07 GMT
> Hi,
>
[quoted text clipped - 26 lines]
>
> Dave

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.