Random Session Expiration

G

Guest

I am working on ASP.NET application in which the session expires randomly on
any page.
Before the session expires I see the following error in VS.NEt output window

==============================================
An unhandled exception of type 'System.Threading.ThreadAbortException'
occurred in Unknown Module.

Additional information: Thread was being aborted.
The program '[6036] aspnet_wp.exe:
/LM/w3svc/1/root/GWRS.Web-23-127465768399324317' has exited with code 0 (0x0).
The thread '<No Name>' (0x157c) has exited with code 0 (0x0).
==============================================

Thanks
Shrinivas
 
J

John M Deal

I've never seen this happen when session expires, but I have seen it
when a response.redirect is used without specifying the second parameter
as true as it aborts the processing of the current page and then
attempts to switch to the new page. I'm sure there are lots of other
reasons for this exception to happen, however I'd at least eliminate
this possibility. If you have any Response.Redirects I'd try changing
them to something like:

Response.Redirect("NewPage.aspx", true);

Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software
 
G

Guest

Hi John,

Thanks for your response.
I don't have any Response.Redirect's in my code. This problem is like I
mentioned random. Sometimes the session does not expire till 20 minutes which
is the timeout specified in Web.config.

Thanks
Shrinivas

John M Deal said:
I've never seen this happen when session expires, but I have seen it
when a response.redirect is used without specifying the second parameter
as true as it aborts the processing of the current page and then
attempts to switch to the new page. I'm sure there are lots of other
reasons for this exception to happen, however I'd at least eliminate
this possibility. If you have any Response.Redirects I'd try changing
them to something like:

Response.Redirect("NewPage.aspx", true);

Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Shrinivas said:
I am working on ASP.NET application in which the session expires randomly on
any page.
Before the session expires I see the following error in VS.NEt output window

==============================================
An unhandled exception of type 'System.Threading.ThreadAbortException'
occurred in Unknown Module.

Additional information: Thread was being aborted.
The program '[6036] aspnet_wp.exe:
/LM/w3svc/1/root/GWRS.Web-23-127465768399324317' has exited with code 0 (0x0).
The thread '<No Name>' (0x157c) has exited with code 0 (0x0).
==============================================

Thanks
Shrinivas
 
H

Hans Kesting

Shrinivas said:
I am working on ASP.NET application in which the session expires
randomly on any page.
Before the session expires I see the following error in VS.NEt output
window

==============================================
An unhandled exception of type 'System.Threading.ThreadAbortException'
occurred in Unknown Module.

Additional information: Thread was being aborted.
The program '[6036] aspnet_wp.exe:
/LM/w3svc/1/root/GWRS.Web-23-127465768399324317' has exited with code
0 (0x0). The thread '<No Name>' (0x157c) has exited with code 0 (0x0).
==============================================

Thanks
Shrinivas

you will get a ThreadAbortException if you do a Response.Redirect
from with a try/catch block.
I don't know if that will end your session though...

Hans Kesting
 
B

bruce barker

you are probably using inproc sessions. these are stored in memory in the
aspnet_wp.exe worker process. as your error messages states, it getting an
exception, and aborting, thus losing your session data.

most likely you are using unmanged code (say a com dll), that is taking own
the worker process.

-- bruce (sqlwork.com)


message | I am working on ASP.NET application in which the session expires randomly
on
| any page.
| Before the session expires I see the following error in VS.NEt output
window
|
| ==============================================
| An unhandled exception of type 'System.Threading.ThreadAbortException'
| occurred in Unknown Module.
|
| Additional information: Thread was being aborted.
| The program '[6036] aspnet_wp.exe:
| /LM/w3svc/1/root/GWRS.Web-23-127465768399324317' has exited with code 0
(0x0).
| The thread '<No Name>' (0x157c) has exited with code 0 (0x0).
| ==============================================
|
| Thanks
| Shrinivas
 
G

Guest

I am not using any unmanaged code. No COM Interop or COM+. Pure managed code.

Thanks
Shrinivas
 
G

Guest

Session was expiring intermittently for me when i run my app locally on my box.
It was due to VShield virus scan running in the background !!
I had to disable it every time before running my application.

Hope it helps..
Vinay

Shrinivas Reddy said:
I am not using any unmanaged code. No COM Interop or COM+. Pure managed code.

Thanks
Shrinivas

bruce barker said:
you are probably using inproc sessions. these are stored in memory in the
aspnet_wp.exe worker process. as your error messages states, it getting an
exception, and aborting, thus losing your session data.

most likely you are using unmanged code (say a com dll), that is taking own
the worker process.

-- bruce (sqlwork.com)


message | I am working on ASP.NET application in which the session expires randomly
on
| any page.
| Before the session expires I see the following error in VS.NEt output
window
|
| ==============================================
| An unhandled exception of type 'System.Threading.ThreadAbortException'
| occurred in Unknown Module.
|
| Additional information: Thread was being aborted.
| The program '[6036] aspnet_wp.exe:
| /LM/w3svc/1/root/GWRS.Web-23-127465768399324317' has exited with code 0
(0x0).
| The thread '<No Name>' (0x157c) has exited with code 0 (0x0).
| ==============================================
|
| Thanks
| Shrinivas
 
B

bruce barker

you still need to find what is crashing aspnet_wp.exe. attach with a
debugger (debug unmanaged code), and examine the stack on the abort.

-- bruce (sqlwork.com)


message | I am not using any unmanaged code. No COM Interop or COM+. Pure managed
code.
|
| Thanks
| Shrinivas
|
| "bruce barker" wrote:
|
| > you are probably using inproc sessions. these are stored in memory in
the
| > aspnet_wp.exe worker process. as your error messages states, it getting
an
| > exception, and aborting, thus losing your session data.
| >
| > most likely you are using unmanged code (say a com dll), that is taking
own
| > the worker process.
| >
| > -- bruce (sqlwork.com)
| >
| >
| > message | > | I am working on ASP.NET application in which the session expires
randomly
| > on
| > | any page.
| > | Before the session expires I see the following error in VS.NEt output
| > window
| > |
| > | ==============================================
| > | An unhandled exception of type 'System.Threading.ThreadAbortException'
| > | occurred in Unknown Module.
| > |
| > | Additional information: Thread was being aborted.
| > | The program '[6036] aspnet_wp.exe:
| > | /LM/w3svc/1/root/GWRS.Web-23-127465768399324317' has exited with code
0
| > (0x0).
| > | The thread '<No Name>' (0x157c) has exited with code 0 (0x0).
| > | ==============================================
| > |
| > | Thanks
| > | Shrinivas
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top