Ported over pages from NT4.0; to Win2003R1 -IIS6.0
Have accounted for - and got everything working except.... half the time it
seems like our session variables "disappear" or get wipped out - within
minutes / seconds.
Other times - seems to work for about 20 minutes. What gives??
What settings am I missing.

Re: Session Variables Disapper by Ken

Ken
Tue Dec 13 00:02:27 CST 2005

Hi,

There is no "make session variables disappear at random intervals" setting
in IIS6.

Did you configure a web garden for your worker process? If you have multiple
w3wp.exe serving a single app pool, and you are using in-memory session
state, then the individual processes can not access the session variables
stored in the other process.

Otherwise, have you verified that the session cookies are being
sent/returned properly by client and server?

Cheers
Ken

"ebtsup" <ebtsup@discussions.microsoft.com> wrote in message
news:08E83CD0-A484-414E-A135-0F74B1E00043@microsoft.com...
: Ported over pages from NT4.0; to Win2003R1 -IIS6.0
: Have accounted for - and got everything working except.... half the time
it
: seems like our session variables "disappear" or get wipped out - within
: minutes / seconds.
: Other times - seems to work for about 20 minutes. What gives??
: What settings am I missing.
:



Re: Session Variables Disapper by ebtsup

ebtsup
Tue Dec 13 17:38:02 CST 2005

Ok - I can see I have a lot to learn....
To answer the following:
"Ken Schaefer" wrote:
> Did you configure a web garden for your worker process? If you have multiple
> w3wp.exe serving a single app pool, and you are using in-memory session
> state, then the individual processes can not access the session variables
> stored in the other process.
.. we do have mutliple websites / multiple w3wp.exe. Where do I to learn
more about this. {Sorry we have been NT4.0 -this is all new to us }
Thanks for your reply

Re: Session Variables Disapper by ebtsup

ebtsup
Tue Dec 13 17:45:02 CST 2005

Ok, went out and set-up Maximum number of processess to '8'. Not sure that
is too low or too high. We have 5 websites - using ASP on this particular
server. One of them averages about 800-1000 unique hits a day.

"ebtsup" wrote:

> Ok - I can see I have a lot to learn....
> To answer the following:
> "Ken Schaefer" wrote:
> > Did you configure a web garden for your worker process? If you have multiple
> > w3wp.exe serving a single app pool, and you are using in-memory session
> > state, then the individual processes can not access the session variables
> > stored in the other process.
> .. we do have mutliple websites / multiple w3wp.exe. Where do I to learn
> more about this. {Sorry we have been NT4.0 -this is all new to us }
> Thanks for your reply

Re: Session Variables Disapper by Ken

Ken
Tue Dec 13 18:15:18 CST 2005

Hi,

If you are using Classic ASP applications, and using in-process session
state storage, then you should set the number of worker processes per
application pool to 1. Otherwise, you will run into issues with session
variables. Each w3wp.exe process can not see inside any other w3wp.exe
process (including the session state contained therein). So the first
request by a user might be handled by one w3wp.exe and a new session
created. The next request by the user is handled by a second w3wp.exe
process, and this second w3wp.exe process doesn't know anything about the
session created by the first w3wp.exe process.

NOTE: You can still have different w3wp.exe processes servicing different
Web App Pools - that's fine. It's just having multiple w3wp.exe processes
servicing a *single* web app pool (a so called "web garden"

Web Apps/Sites -- assigned to --> Web App Pools <-- handle requests for --
w3wp.exe

So, you have a minimum of one w3wp.exe per Web App Pool (which is handling
one or more Web Apps/Sites). However you can have multiple w3wp.exe
servicing the Web App Pool as well, but this leads to problems if you are
using in-process session state storage. ASP.NET provides options to store
session state in a dedicated Session State Service, or in SQL Server, which
gets around this.

Cheers
Ken

"ebtsup" <ebtsup@discussions.microsoft.com> wrote in message
news:FE0AC61D-870A-44DE-9C60-5C5D0CBAC21B@microsoft.com...
: Ok, went out and set-up Maximum number of processess to '8'. Not sure
that
: is too low or too high. We have 5 websites - using ASP on this particular
: server. One of them averages about 800-1000 unique hits a day.
:
: "ebtsup" wrote:
:
: > Ok - I can see I have a lot to learn....
: > To answer the following:
: > "Ken Schaefer" wrote:
: > > Did you configure a web garden for your worker process? If you have
multiple
: > > w3wp.exe serving a single app pool, and you are using in-memory
session
: > > state, then the individual processes can not access the session
variables
: > > stored in the other process.
: > .. we do have mutliple websites / multiple w3wp.exe. Where do I to
learn
: > more about this. {Sorry we have been NT4.0 -this is all new to us }
: > Thanks for your reply



Re: Session Variables Disapper by ebtsup

ebtsup
Wed Dec 14 08:20:02 CST 2005

OK - I get it.. I think.
A web garden process - many processes to one Web-site (not good for classic
ASP).
So I set # processes back to '1' - but am still keen to know as to why the
session variables become 'missing' - Null - at a certain point in time.
Yes- we verified that the session variables are being set correctly. As
this same "set" of web-sites work fine on NT4.0 machine.

I think what I will do - is just pass the variables in the URL for right
now. Little bit more coding - but that will get going. I appreciate all of
your help and insight.

"Ken Schaefer" wrote:

> Hi,
>
> If you are using Classic ASP applications, and using in-process session
> state storage, then you should set the number of worker processes per
> application pool to 1. Otherwise, you will run into issues with session
> variables. Each w3wp.exe process can not see inside any other w3wp.exe
> process (including the session state contained therein). So the first
> request by a user might be handled by one w3wp.exe and a new session
> created. The next request by the user is handled by a second w3wp.exe
> process, and this second w3wp.exe process doesn't know anything about the
> session created by the first w3wp.exe process.
>
> NOTE: You can still have different w3wp.exe processes servicing different
> Web App Pools - that's fine. It's just having multiple w3wp.exe processes
> servicing a *single* web app pool (a so called "web garden"
>
> Web Apps/Sites -- assigned to --> Web App Pools <-- handle requests for --
> w3wp.exe
>
> So, you have a minimum of one w3wp.exe per Web App Pool (which is handling
> one or more Web Apps/Sites). However you can have multiple w3wp.exe
> servicing the Web App Pool as well, but this leads to problems if you are
> using in-process session state storage. ASP.NET provides options to store
> session state in a dedicated Session State Service, or in SQL Server, which
> gets around this.
>
> Cheers
> Ken
>
> "ebtsup" <ebtsup@discussions.microsoft.com> wrote in message
> news:FE0AC61D-870A-44DE-9C60-5C5D0CBAC21B@microsoft.com...
> : Ok, went out and set-up Maximum number of processess to '8'. Not sure
> that
> : is too low or too high. We have 5 websites - using ASP on this particular
> : server. One of them averages about 800-1000 unique hits a day.
> :
> : "ebtsup" wrote:
> :
> : > Ok - I can see I have a lot to learn....
> : > To answer the following:
> : > "Ken Schaefer" wrote:
> : > > Did you configure a web garden for your worker process? If you have
> multiple
> : > > w3wp.exe serving a single app pool, and you are using in-memory
> session
> : > > state, then the individual processes can not access the session
> variables
> : > > stored in the other process.
> : > .. we do have mutliple websites / multiple w3wp.exe. Where do I to
> learn
> : > more about this. {Sorry we have been NT4.0 -this is all new to us }
> : > Thanks for your reply
>
>
>

Re: Session Variables Disapper by Ken

Ken
Thu Dec 15 18:22:22 CST 2005

Hi,

I am not sure why the variables are "disappearing". If you have multiple
worker processes (ala a web garden), then you will see behaviour that looks
like variables disappearing. This is because there is no gaurantee that each
request by a client will be routed to the same worker process (ala sticky
sessions). Each time the client request is handled by a new worker process,
your session variables will appear to be "lost".

If you only have a single worker process then:
a) verify that session cookies are being sent by the server, and returned by
the client for each request (using a packet capture tool like Ethereal or
Netmon)

b) verify that the worker process isn't being recycled for any reason (you
can look in the Windows Event Logs for these events)

Cheers
Ken


"ebtsup" <ebtsup@discussions.microsoft.com> wrote in message
news:5F8E1838-E1AE-4EC3-A164-F2F5FF7B8EF0@microsoft.com...
: OK - I get it.. I think.
: A web garden process - many processes to one Web-site (not good for
classic
: ASP).
: So I set # processes back to '1' - but am still keen to know as to why the
: session variables become 'missing' - Null - at a certain point in time.
: Yes- we verified that the session variables are being set correctly. As
: this same "set" of web-sites work fine on NT4.0 machine.
:
: I think what I will do - is just pass the variables in the URL for right
: now. Little bit more coding - but that will get going. I appreciate all
of
: your help and insight.
:
: "Ken Schaefer" wrote:
:
: > Hi,
: >
: > If you are using Classic ASP applications, and using in-process session
: > state storage, then you should set the number of worker processes per
: > application pool to 1. Otherwise, you will run into issues with session
: > variables. Each w3wp.exe process can not see inside any other w3wp.exe
: > process (including the session state contained therein). So the first
: > request by a user might be handled by one w3wp.exe and a new session
: > created. The next request by the user is handled by a second w3wp.exe
: > process, and this second w3wp.exe process doesn't know anything about
the
: > session created by the first w3wp.exe process.
: >
: > NOTE: You can still have different w3wp.exe processes servicing
different
: > Web App Pools - that's fine. It's just having multiple w3wp.exe
processes
: > servicing a *single* web app pool (a so called "web garden"
: >
: > Web Apps/Sites -- assigned to --> Web App Pools <-- handle requests
for --
: > w3wp.exe
: >
: > So, you have a minimum of one w3wp.exe per Web App Pool (which is
handling
: > one or more Web Apps/Sites). However you can have multiple w3wp.exe
: > servicing the Web App Pool as well, but this leads to problems if you
are
: > using in-process session state storage. ASP.NET provides options to
store
: > session state in a dedicated Session State Service, or in SQL Server,
which
: > gets around this.
: >
: > Cheers
: > Ken
: >
: > "ebtsup" <ebtsup@discussions.microsoft.com> wrote in message
: > news:FE0AC61D-870A-44DE-9C60-5C5D0CBAC21B@microsoft.com...
: > : Ok, went out and set-up Maximum number of processess to '8'. Not sure
: > that
: > : is too low or too high. We have 5 websites - using ASP on this
particular
: > : server. One of them averages about 800-1000 unique hits a day.
: > :
: > : "ebtsup" wrote:
: > :
: > : > Ok - I can see I have a lot to learn....
: > : > To answer the following:
: > : > "Ken Schaefer" wrote:
: > : > > Did you configure a web garden for your worker process? If you
have
: > multiple
: > : > > w3wp.exe serving a single app pool, and you are using in-memory
: > session
: > : > > state, then the individual processes can not access the session
: > variables
: > : > > stored in the other process.
: > : > .. we do have mutliple websites / multiple w3wp.exe. Where do I to
: > learn
: > : > more about this. {Sorry we have been NT4.0 -this is all new to us }
: > : > Thanks for your reply
: >
: >
: >