473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Session Timeout Event never happens?

Folks.

In a B2B Procurement system we've created, we got following Session-Issue:

Configuration: We are using IIS 6.0 and added SQL-Based-Sessions in
web.config with a timeout of 240 minutes and set them to cookieless mode.
As well we added Session.Timeout=240 in asp.net-application and saved data
into the session.

Session-Timeout in IIS is also set to 240.

When looking at the ASPStateTempSessions table, we can see Expires field
which has the correct expirery-value.

Problem: We don't ever get any timeout. Session seems to be still alive
after 14 hours. If we call session with session-id in url, we get all values
we set before out of the session.

As well we tried to set session-timeout to 1minute, but same thing happened
(in application and IIS and web.config) Also we tried to disable
Session-State in IIS. But everytime the same result: Session gets not
destroyed (Session.Abandon()) after expirery-time passed.

Did we overlook something? What keeps the session alive?

Thanks for help in advance,

Tim (Cy************@newsgroup.nospam)
Nov 19 '05 #1
5 2836
Is SQL Server Agent running ?

See http://www.dbazine.com/cook9.shtml

"The InstallSqlState.sql script creates a job called
ASPState_Job_DeleteExpiredSessions to delete
expired sessions from tempdb.

Recall that ASP.NET does not keep session resources
alive indefinitely. To support this feature when a SQL Server
is used to maintain state, the SQL Server Agent must be running
so that the expired session deletion job runs as needed.

By default, the job is scheduled to run every minute. It deletes
session state rows with an Expires value less than the current time.

The account under which the SQL Server Agent runs must have the
privilege to execute the DeleteExpiredSessions stored procedure."

---000---

If SQL Server Agent isn't running,
The DeleteExpiredSessions job can't run.

I hope that's it!

Juan T. Llibre
===========
"Tim W." <Cy************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Folks.

In a B2B Procurement system we've created, we got following Session-Issue:

Configuration: We are using IIS 6.0 and added SQL-Based-Sessions in
web.config with a timeout of 240 minutes and set them to cookieless mode.
As well we added Session.Timeout=240 in asp.net-application and saved data
into the session.

Session-Timeout in IIS is also set to 240.

When looking at the ASPStateTempSessions table, we can see Expires field
which has the correct expirery-value.

Problem: We don't ever get any timeout. Session seems to be still alive
after 14 hours. If we call session with session-id in url, we get all
values we set before out of the session.

As well we tried to set session-timeout to 1minute, but same thing
happened (in application and IIS and web.config) Also we tried to disable
Session-State in IIS. But everytime the same result: Session gets not
destroyed (Session.Abandon()) after expirery-time passed.

Did we overlook something? What keeps the session alive?

Thanks for help in advance,

Tim (Cy************@newsgroup.nospam)


Nov 19 '05 #2
Hi Juan,

first checked whether Agent is running: it is! Nonetheless: I don't think
ASPStats_Job_DeleteExpiredSessions is registered. How can I make sure,
and is there a way to setup this job other than re-installing the whole IIS?

Tim

"Juan T. Llibre [MVP]" <no***********@nowhere.com> schrieb im Newsbeitrag
news:e4**************@TK2MSFTNGP15.phx.gbl...
Is SQL Server Agent running ?

See http://www.dbazine.com/cook9.shtml

"The InstallSqlState.sql script creates a job called
ASPState_Job_DeleteExpiredSessions to delete
expired sessions from tempdb.

Recall that ASP.NET does not keep session resources
alive indefinitely. To support this feature when a SQL Server
is used to maintain state, the SQL Server Agent must be running
so that the expired session deletion job runs as needed.

By default, the job is scheduled to run every minute. It deletes
session state rows with an Expires value less than the current time.

The account under which the SQL Server Agent runs must have the
privilege to execute the DeleteExpiredSessions stored procedure."

---000---

If SQL Server Agent isn't running,
The DeleteExpiredSessions job can't run.

I hope that's it!

Juan T. Llibre
===========
"Tim W." <Cy************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Folks.

In a B2B Procurement system we've created, we got following
Session-Issue:

Configuration: We are using IIS 6.0 and added SQL-Based-Sessions in
web.config with a timeout of 240 minutes and set them to cookieless mode.
As well we added Session.Timeout=240 in asp.net-application and saved
data
into the session.

Session-Timeout in IIS is also set to 240.

When looking at the ASPStateTempSessions table, we can see Expires field
which has the correct expirery-value.

Problem: We don't ever get any timeout. Session seems to be still alive
after 14 hours. If we call session with session-id in url, we get all
values we set before out of the session.

As well we tried to set session-timeout to 1minute, but same thing
happened (in application and IIS and web.config) Also we tried to disable
Session-State in IIS. But everytime the same result: Session gets not
destroyed (Session.Abandon()) after expirery-time passed.

Did we overlook something? What keeps the session alive?

Thanks for help in advance,

Tim (Cy************@newsgroup.nospam)


Nov 19 '05 #3
bjc
Hi Tim - Does your code close all data connections (duh)? Try setting
everything that has anything to do with data or a recordsets to null.
"Tim W." <Cy************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Juan,

first checked whether Agent is running: it is! Nonetheless: I don't think
ASPStats_Job_DeleteExpiredSessions is registered. How can I make sure,
and is there a way to setup this job other than re-installing the whole IIS?
Tim

"Juan T. Llibre [MVP]" <no***********@nowhere.com> schrieb im Newsbeitrag
news:e4**************@TK2MSFTNGP15.phx.gbl...
Is SQL Server Agent running ?

See http://www.dbazine.com/cook9.shtml

"The InstallSqlState.sql script creates a job called
ASPState_Job_DeleteExpiredSessions to delete
expired sessions from tempdb.

Recall that ASP.NET does not keep session resources
alive indefinitely. To support this feature when a SQL Server
is used to maintain state, the SQL Server Agent must be running
so that the expired session deletion job runs as needed.

By default, the job is scheduled to run every minute. It deletes
session state rows with an Expires value less than the current time.

The account under which the SQL Server Agent runs must have the
privilege to execute the DeleteExpiredSessions stored procedure."

---000---

If SQL Server Agent isn't running,
The DeleteExpiredSessions job can't run.

I hope that's it!

Juan T. Llibre
===========
"Tim W." <Cy************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Folks.

In a B2B Procurement system we've created, we got following
Session-Issue:

Configuration: We are using IIS 6.0 and added SQL-Based-Sessions in
web.config with a timeout of 240 minutes and set them to cookieless mode. As well we added Session.Timeout=240 in asp.net-application and saved
data
into the session.

Session-Timeout in IIS is also set to 240.

When looking at the ASPStateTempSessions table, we can see Expires field which has the correct expirery-value.

Problem: We don't ever get any timeout. Session seems to be still alive
after 14 hours. If we call session with session-id in url, we get all
values we set before out of the session.

As well we tried to set session-timeout to 1minute, but same thing
happened (in application and IIS and web.config) Also we tried to disable Session-State in IIS. But everytime the same result: Session gets not
destroyed (Session.Abandon()) after expirery-time passed.

Did we overlook something? What keeps the session alive?

Thanks for help in advance,

Tim (Cy************@newsgroup.nospam)



Nov 19 '05 #4
Hi Tim,

I think Juan's suggestion is correct. To enable the SQLserver's auto
deleting on expired session item, we need to ensure that the SQL Agent is
running. In addition, based on my test, When we start a IE browser instance
to visist a sqlserver session app's page, the session will always remain
the same no matter it has been timeout during the post backs or not. But
this doesn't means that the session record in the SqlServer will alwasy
remain, in fact, the record in the sqlserver will be deleted correctly when
it is expired. You can make a simple page( in a sql session webapp with
timeout = 1 min). You'll found the certain session record will be deleted
from the database after timeout timespan, but when you request the page
again, a new record is created, and the displaying SessionId in asp.net is
still the same.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #5
Hi, Tim.

Reinstalling IIS is not needed.

What you need to do is make sure that the
DeleteExpiredSessions stored procedure
is run by a SQL Server Agent as a job.

The InstallSqlState.sql script should have created the
job called ASPState_Job_DeleteExpiredSessions.

If, for any reason at all, that didn't happen,
look for InstallSqlState.sql in the .
%windir%\Microsoft.Net\Framework\v1.1.4322 directory,
if you're using .Net Framework 1.1, or the appropiate
version number directory if using a different version.

If you don't have critical data yet, it probably would be
easier to drop the whole shebang by running the
"UninstallSqlState.sql" script found in the same directory,
and then reinstalling it by running InstallSqlState.sql again
( using SQL Server Query Analyzer for both ).

Then, make sure that SQL Server Agent
is run automatically when Windows starts
( Administrative Tools -> Services, look for SQL Server Agent,
and set to automatic startup )

That should get you up and running.

Let us know how you make out.

I will not be available after tomorrow ( 2 week vacation ),
but there's any number of good people here who can help.

Juan T. Llibre
===========
"Tim W." <Cy************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Juan,

first checked whether Agent is running: it is! Nonetheless: I don't think
ASPStats_Job_DeleteExpiredSessions is registered. How can I make sure,
and is there a way to setup this job other than re-installing the whole
IIS?

Tim

"Juan T. Llibre [MVP]" <no***********@nowhere.com> schrieb im Newsbeitrag
news:e4**************@TK2MSFTNGP15.phx.gbl...
Is SQL Server Agent running ?

See http://www.dbazine.com/cook9.shtml

"The InstallSqlState.sql script creates a job called
ASPState_Job_DeleteExpiredSessions to delete
expired sessions from tempdb.

Recall that ASP.NET does not keep session resources
alive indefinitely. To support this feature when a SQL Server
is used to maintain state, the SQL Server Agent must be running
so that the expired session deletion job runs as needed.

By default, the job is scheduled to run every minute. It deletes
session state rows with an Expires value less than the current time.

The account under which the SQL Server Agent runs must have the
privilege to execute the DeleteExpiredSessions stored procedure."

---000---

If SQL Server Agent isn't running,
The DeleteExpiredSessions job can't run.

I hope that's it!

Juan T. Llibre
===========
"Tim W." <Cy************@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Folks.

In a B2B Procurement system we've created, we got following
Session-Issue:

Configuration: We are using IIS 6.0 and added SQL-Based-Sessions in
web.config with a timeout of 240 minutes and set them to cookieless
mode.
As well we added Session.Timeout=240 in asp.net-application and saved
data
into the session.

Session-Timeout in IIS is also set to 240.

When looking at the ASPStateTempSessions table, we can see Expires field
which has the correct expirery-value.

Problem: We don't ever get any timeout. Session seems to be still alive
after 14 hours. If we call session with session-id in url, we get all
values we set before out of the session.

As well we tried to set session-timeout to 1minute, but same thing
happened (in application and IIS and web.config) Also we tried to
disable
Session-State in IIS. But everytime the same result: Session gets not
destroyed (Session.Abandon()) after expirery-time passed.

Did we overlook something? What keeps the session alive?

Thanks for help in advance,

Tim (Cy************@newsgroup.nospam)



Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Frank | last post by:
Our system maintains session state using the ASP.NET State Server service. We expect some of our session state objects to be over 85K, which categorizes them to be VLO's (very large objects) in terms...
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
5
by: fbwhite | last post by:
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...
5
by: news.microsoft.com | last post by:
Hi everyone, I need some help (may be in the form of some sample code) for the subject question. I have an ASP.NET/C# application. I need to do quite a few tasks when the session ends. I...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
5
by: David Lozzi | last post by:
Howdy, is the Session_End event a guarantee event to be fired? I have this memory of back in ASP and IIS 4 that the event was guaranteed, like a 50/50 chance. If I have some shopping cart clean...
2
by: buu | last post by:
how could I handle session timeout event in asp.net? I would like to perform some action on database when it happens
6
by: Marcus | last post by:
I have an ASP.Net 2.0 app that needs to jump out onto another web server running a java server page website (Apache TomCat 4.1.12) that I control. I hate that it needs to do this, but we are using...
4
by: Joey | last post by:
I have an asp.net 2.0 app written in C# and VS2005. I sometimes have issues where users leave a page onscreen and then come back to it a few hours later and try to continue working. Of course, it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.