By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

Users are randomly losing session and are forced to relogin

P: n/a
I know this issue has been brought up many times, but I have tried many of
the solutions to no avail. I wanted to give my specific case to see if
someone could be of any help.

We are using the sessionstate inproc mode and users are randomly losing
their session. I do not believe it is happening across all users at one
time. It seems to happen to different users at different times, but I am
only going off heresay. The aspnet worker process is not showing a restart
in the event log, do I need to turn on some setting in order for the restart
to be logged? Our production server is a 4 proc server running win 2003. We
are not running a web farm or garden. We do not have virus scanning turned
on for the asp.net application folders. Our timeout is 240 minutes and it is
set in IIS and in the web.config file. With this high timeout setting, some
users still get timed out after a few minutes.

Session dropping seems to be a popular issue with inproc, but most of the
threads refer to the worker process restarting for some reason. If the
worker process restart is not the cause, is there any other thing we can try
or something we can log to determine why the sessions are dropping.
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi,

Session state is often lost when the application domain unloads. This is
not the same as seeing the process cycle. In order to see if the app
domain has recycled, you will need to monitor the ASP.NET v1.1.4322 object
in Performance Monitor and see if the Application Restarts counter
increments.

You may also want to check your Forms authentication timeout. I don't know
for sure you are using Forms auth, but you did say that people are being
forced to log back in. I've seen plenty of cases where it's not Session
state getting lost, but the FormsAuthenticationTicket expiring.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Users are randomly losing session and are forced to relogin
| thread-index: AcTHNLNq4nrPZS/qQKGfZAScPKm6Gw==
| X-WBNR-Posting-Host: 198.179.10.7
| From: =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?= <fb*****@online.nospam>
| Subject: Users are randomly losing session and are forced to relogin
| Date: Wed, 10 Nov 2004 06:51:03 -0800
| Lines: 19
| Message-ID: <5A**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275008
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I know this issue has been brought up many times, but I have tried many
of
| the solutions to no avail. I wanted to give my specific case to see if
| someone could be of any help.
|
| We are using the sessionstate inproc mode and users are randomly losing
| their session. I do not believe it is happening across all users at one
| time. It seems to happen to different users at different times, but I am
| only going off heresay. The aspnet worker process is not showing a
restart
| in the event log, do I need to turn on some setting in order for the
restart
| to be logged? Our production server is a 4 proc server running win 2003.
We
| are not running a web farm or garden. We do not have virus scanning
turned
| on for the asp.net application folders. Our timeout is 240 minutes and
it is
| set in IIS and in the web.config file. With this high timeout setting,
some
| users still get timed out after a few minutes.
|
| Session dropping seems to be a popular issue with inproc, but most of the
| threads refer to the worker process restarting for some reason. If the
| worker process restart is not the cause, is there any other thing we can
try
| or something we can log to determine why the sessions are dropping.
|

Nov 18 '05 #2

P: n/a
Hey Jim
I have a Question related to losing session.

When i run my application locally, most of the time my session is lost.
I came to understand that it is because VShield (Virus Scanner) is running
in the background. So, i have to disable everytime i need to run my
application??
And it works fine.

Do you think losing session is also related to Virus Scanner running in the
background???

Thanks
vinay

"Jim Cheshire [MSFT]" wrote:
Hi,

Session state is often lost when the application domain unloads. This is
not the same as seeing the process cycle. In order to see if the app
domain has recycled, you will need to monitor the ASP.NET v1.1.4322 object
in Performance Monitor and see if the Application Restarts counter
increments.

You may also want to check your Forms authentication timeout. I don't know
for sure you are using Forms auth, but you did say that people are being
forced to log back in. I've seen plenty of cases where it's not Session
state getting lost, but the FormsAuthenticationTicket expiring.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Users are randomly losing session and are forced to relogin
| thread-index: AcTHNLNq4nrPZS/qQKGfZAScPKm6Gw==
| X-WBNR-Posting-Host: 198.179.10.7
| From: =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?= <fb*****@online.nospam>
| Subject: Users are randomly losing session and are forced to relogin
| Date: Wed, 10 Nov 2004 06:51:03 -0800
| Lines: 19
| Message-ID: <5A**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275008
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I know this issue has been brought up many times, but I have tried many
of
| the solutions to no avail. I wanted to give my specific case to see if
| someone could be of any help.
|
| We are using the sessionstate inproc mode and users are randomly losing
| their session. I do not believe it is happening across all users at one
| time. It seems to happen to different users at different times, but I am
| only going off heresay. The aspnet worker process is not showing a
restart
| in the event log, do I need to turn on some setting in order for the
restart
| to be logged? Our production server is a 4 proc server running win 2003.
We
| are not running a web farm or garden. We do not have virus scanning
turned
| on for the asp.net application folders. Our timeout is 240 minutes and
it is
| set in IIS and in the web.config file. With this high timeout setting,
some
| users still get timed out after a few minutes.
|
| Session dropping seems to be a popular issue with inproc, but most of the
| threads refer to the worker process restarting for some reason. If the
| worker process restart is not the cause, is there any other thing we can
try
| or something we can log to determine why the sessions are dropping.
|

Nov 18 '05 #3

P: n/a
IIS6 ? I've heard you could use an isolation mode that make requests to be
handled by diffrent processes...

Patrice

--

<fb*****@online.nospam> a écrit dans le message de
news:5A**********************************@microsof t.com...
I know this issue has been brought up many times, but I have tried many of
the solutions to no avail. I wanted to give my specific case to see if
someone could be of any help.

We are using the sessionstate inproc mode and users are randomly losing
their session. I do not believe it is happening across all users at one
time. It seems to happen to different users at different times, but I am
only going off heresay. The aspnet worker process is not showing a restart in the event log, do I need to turn on some setting in order for the restart to be logged? Our production server is a 4 proc server running win 2003. We are not running a web farm or garden. We do not have virus scanning turned on for the asp.net application folders. Our timeout is 240 minutes and it is set in IIS and in the web.config file. With this high timeout setting, some users still get timed out after a few minutes.

Session dropping seems to be a popular issue with inproc, but most of the
threads refer to the worker process restarting for some reason. If the
worker process restart is not the cause, is there any other thing we can try or something we can log to determine why the sessions are dropping.

Nov 18 '05 #4

P: n/a
I ran perfmon in our test environment (the problem occurs here too, win 2003,
2 processors) on the asp.net v1.1.4322 object and did not see the application
restarts counter go up. The counter was static during the whole test and I
was kicked out after about an hour when our timeout setting is set to 4
hours.

Yes, we are using forms authentication and the timeout value is in the forms
section:
<sessionState cookieless="false" timeout="240" mode="InProc" />
<authentication mode="Forms">
<forms name="AUTH" loginUrl="login.aspx" protection="All"
timeout="240"></forms></authentication>

How can I tell if the formauthenticationticket expires? Is there anything
else we can try? Would switching to state server fix this issue if it is not
a app restart issue that is causing the problem in inproc mode?
"Jim Cheshire [MSFT]" wrote:
Hi,

Session state is often lost when the application domain unloads. This is
not the same as seeing the process cycle. In order to see if the app
domain has recycled, you will need to monitor the ASP.NET v1.1.4322 object
in Performance Monitor and see if the Application Restarts counter
increments.

You may also want to check your Forms authentication timeout. I don't know
for sure you are using Forms auth, but you did say that people are being
forced to log back in. I've seen plenty of cases where it's not Session
state getting lost, but the FormsAuthenticationTicket expiring.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Users are randomly losing session and are forced to relogin
| thread-index: AcTHNLNq4nrPZS/qQKGfZAScPKm6Gw==
| X-WBNR-Posting-Host: 198.179.10.7
| From: =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?= <fb*****@online.nospam>
| Subject: Users are randomly losing session and are forced to relogin
| Date: Wed, 10 Nov 2004 06:51:03 -0800
| Lines: 19
| Message-ID: <5A**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275008
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I know this issue has been brought up many times, but I have tried many
of
| the solutions to no avail. I wanted to give my specific case to see if
| someone could be of any help.
|
| We are using the sessionstate inproc mode and users are randomly losing
| their session. I do not believe it is happening across all users at one
| time. It seems to happen to different users at different times, but I am
| only going off heresay. The aspnet worker process is not showing a
restart
| in the event log, do I need to turn on some setting in order for the
restart
| to be logged? Our production server is a 4 proc server running win 2003.
We
| are not running a web farm or garden. We do not have virus scanning
turned
| on for the asp.net application folders. Our timeout is 240 minutes and
it is
| set in IIS and in the web.config file. With this high timeout setting,
some
| users still get timed out after a few minutes.
|
| Session dropping seems to be a popular issue with inproc, but most of the
| threads refer to the worker process restarting for some reason. If the
| worker process restart is not the cause, is there any other thing we can
try
| or something we can log to determine why the sessions are dropping.
|

Nov 18 '05 #5

P: n/a
The Application Restarts counter won't work right on Windows 2003. Poor
reading on my part. Sorry about that.

Does everyone lose Session state when this happens?

You can tell if it really is Session timing out by adding some logging code
to the Session_End event. You can also track application restarts by
adding logging code to the Application_End event.

If you still can't get the data you need, you can open a case with us and
we'll help you configure an HttpModule that we can use to log application
restarts.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
| Thread-Topic: Users are randomly losing session and are forced to relogin
| thread-index: AcTIF/0Vid1i6IOdSt6WpzkqcfYq5A==
| X-WBNR-Posting-Host: 198.179.10.7
| From: =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?= <fb*****@online.nospam>
| References: <5A**********************************@microsoft.co m>
<pb**************@cpmsftngxa10.phx.gbl>
| Subject: RE: Users are randomly losing session and are forced to relogin
| Date: Thu, 11 Nov 2004 09:58:02 -0800
| Lines: 97
| Message-ID: <4C**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275394
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I ran perfmon in our test environment (the problem occurs here too, win
2003,
| 2 processors) on the asp.net v1.1.4322 object and did not see the
application
| restarts counter go up. The counter was static during the whole test and
I
| was kicked out after about an hour when our timeout setting is set to 4
| hours.
|
| Yes, we are using forms authentication and the timeout value is in the
forms
| section:
| <sessionState cookieless="false" timeout="240" mode="InProc" />
| <authentication mode="Forms">
| <forms name="AUTH" loginUrl="login.aspx" protection="All"
| timeout="240"></forms></authentication>
|
| How can I tell if the formauthenticationticket expires? Is there
anything
| else we can try? Would switching to state server fix this issue if it is
not
| a app restart issue that is causing the problem in inproc mode?
|
|
| "Jim Cheshire [MSFT]" wrote:
|
| > Hi,
| >
| > Session state is often lost when the application domain unloads. This
is
| > not the same as seeing the process cycle. In order to see if the app
| > domain has recycled, you will need to monitor the ASP.NET v1.1.4322
object
| > in Performance Monitor and see if the Application Restarts counter
| > increments.
| >
| > You may also want to check your Forms authentication timeout. I don't
know
| > for sure you are using Forms auth, but you did say that people are
being
| > forced to log back in. I've seen plenty of cases where it's not
Session
| > state getting lost, but the FormsAuthenticationTicket expiring.
| >
| > Jim Cheshire [MSFT]
| > MCP+I, MCSE, MCSD, MCDBA
| > ASP.NET Developer Support
| > ja******@online.microsoft.com
| >
| > This post is provided "AS-IS" with no warranties and confers no rights.
| >
| >
| > --------------------
| > | Thread-Topic: Users are randomly losing session and are forced to
relogin
| > | thread-index: AcTHNLNq4nrPZS/qQKGfZAScPKm6Gw==
| > | X-WBNR-Posting-Host: 198.179.10.7
| > | From: =?Utf-8?B?ZmJ3aGl0ZUBvbmxpbmUubm9zcGFt?= <fb*****@online.nospam>
| > | Subject: Users are randomly losing session and are forced to relogin
| > | Date: Wed, 10 Nov 2004 06:51:03 -0800
| > | Lines: 19
| > | Message-ID: <5A**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| > | Path:
| >
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGXA0
| > 3.phx.gbl
| > | Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet:275008
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | I know this issue has been brought up many times, but I have tried
many
| > of
| > | the solutions to no avail. I wanted to give my specific case to see
if
| > | someone could be of any help.
| > |
| > | We are using the sessionstate inproc mode and users are randomly
losing
| > | their session. I do not believe it is happening across all users at
one
| > | time. It seems to happen to different users at different times, but
I am
| > | only going off heresay. The aspnet worker process is not showing a
| > restart
| > | in the event log, do I need to turn on some setting in order for the
| > restart
| > | to be logged? Our production server is a 4 proc server running win
2003.
| > We
| > | are not running a web farm or garden. We do not have virus scanning
| > turned
| > | on for the asp.net application folders. Our timeout is 240 minutes
and
| > it is
| > | set in IIS and in the web.config file. With this high timeout
setting,
| > some
| > | users still get timed out after a few minutes.
| > |
| > | Session dropping seems to be a popular issue with inproc, but most of
the
| > | threads refer to the worker process restarting for some reason. If
the
| > | worker process restart is not the cause, is there any other thing we
can
| > try
| > | or something we can log to determine why the sessions are dropping.
| > |
| >
| >
|

Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.