473,396 Members | 1,963 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,396 software developers and data experts.

sessionstate = SQLServer

I'm wanting to use SQL to store session variables. This works well because
it maintains session variables even though a session times out but the
browser is still open
When a session.entry in the sql table ASPStateTempSessions is automatically
removed whenever the browser calls "Session.Abandon"... this is good, but
the session entry is left when the browser is closed by the user thus ending
the session. How do the entries eventually get cleaned up in the
ASPStateTempSessions table? I can't just have them accumulating over the
years...

anyone use this feature before and has a solution?

MTIA
wardeaux
Nov 18 '05 #1
6 1450
Use the Session_End (or simulair) event. I don't know whether its called
always, but it should be...

Additionally you can add a date to the table when it was last updated and
periodically scrave the database for really old data (which should exist
anyway).
You can use this mechanism to check whether the application actually does
its job.

- Joris

"Wardeaux" <wa******@bellsouth.net> wrote in message
news:uf*************@TK2MSFTNGP10.phx.gbl...
I'm wanting to use SQL to store session variables. This works well because it maintains session variables even though a session times out but the
browser is still open
When a session.entry in the sql table ASPStateTempSessions is automatically removed whenever the browser calls "Session.Abandon"... this is good, but
the session entry is left when the browser is closed by the user thus ending the session. How do the entries eventually get cleaned up in the
ASPStateTempSessions table? I can't just have them accumulating over the
years...

anyone use this feature before and has a solution?

MTIA
wardeaux

Nov 18 '05 #2
AFAIK you should have a SQL Job that cleans up old data. Double check the
SQL scripts...

Patrice

--

"Wardeaux" <wa******@bellsouth.net> a écrit dans le message de
news:uf*************@TK2MSFTNGP10.phx.gbl...
I'm wanting to use SQL to store session variables. This works well because it maintains session variables even though a session times out but the
browser is still open
When a session.entry in the sql table ASPStateTempSessions is automatically removed whenever the browser calls "Session.Abandon"... this is good, but
the session entry is left when the browser is closed by the user thus ending the session. How do the entries eventually get cleaned up in the
ASPStateTempSessions table? I can't just have them accumulating over the
years...

anyone use this feature before and has a solution?

MTIA
wardeaux

Nov 18 '05 #3
Patrice,
Thanks for the reply... I see a script "DeleteExpiredSessions" in the
ASPState db... does this get run automagically (if so... when) or do I need
to run/schedule this (if so... how)?
I'm only lightly familiar with SQL so any help is GREATLY appreciated! :)
MTIA
wardeaux
BTW, I'm not familiar with "AFAIK", what does that stand for?

"Patrice" <no****@nowhere.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
AFAIK you should have a SQL Job that cleans up old data. Double check the
SQL scripts...

Patrice

--

"Wardeaux" <wa******@bellsouth.net> a écrit dans le message de
news:uf*************@TK2MSFTNGP10.phx.gbl...
I'm wanting to use SQL to store session variables. This works well

because
it maintains session variables even though a session times out but the
browser is still open
When a session.entry in the sql table ASPStateTempSessions is

automatically
removed whenever the browser calls "Session.Abandon"... this is good, but the session entry is left when the browser is closed by the user thus

ending
the session. How do the entries eventually get cleaned up in the
ASPStateTempSessions table? I can't just have them accumulating over the years...

anyone use this feature before and has a solution?

MTIA
wardeaux


Nov 18 '05 #4
AFAIK "As Far As I Know" (never used the SQL Server state).

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

that seems to explain this quite well...

SQL Server Agent is likely not running.

--

"Wardeaux" <wa******@bellsouth.net> a écrit dans le message de
news:u8**************@TK2MSFTNGP10.phx.gbl...
Patrice,
Thanks for the reply... I see a script "DeleteExpiredSessions" in the
ASPState db... does this get run automagically (if so... when) or do I need to run/schedule this (if so... how)?
I'm only lightly familiar with SQL so any help is GREATLY appreciated! :)
MTIA
wardeaux
BTW, I'm not familiar with "AFAIK", what does that stand for?

"Patrice" <no****@nowhere.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
AFAIK you should have a SQL Job that cleans up old data. Double check the
SQL scripts...

Patrice

--

"Wardeaux" <wa******@bellsouth.net> a écrit dans le message de
news:uf*************@TK2MSFTNGP10.phx.gbl...
I'm wanting to use SQL to store session variables. This works well

because
it maintains session variables even though a session times out but the
browser is still open
When a session.entry in the sql table ASPStateTempSessions is

automatically
removed whenever the browser calls "Session.Abandon"... this is good,

but the session entry is left when the browser is closed by the user thus

ending
the session. How do the entries eventually get cleaned up in the
ASPStateTempSessions table? I can't just have them accumulating over the years...

anyone use this feature before and has a solution?

MTIA
wardeaux



Nov 18 '05 #5
generally its scheduled with SQLAgent. use sql enterprise manager under
magament->sql server agent ->jobs you should find the sp scheduled to run.
if not add it.

-- bruce (sqlwork.com)

"Wardeaux" <wa******@bellsouth.net> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl...
Patrice,
Thanks for the reply... I see a script "DeleteExpiredSessions" in the
ASPState db... does this get run automagically (if so... when) or do I need to run/schedule this (if so... how)?
I'm only lightly familiar with SQL so any help is GREATLY appreciated! :)
MTIA
wardeaux
BTW, I'm not familiar with "AFAIK", what does that stand for?

"Patrice" <no****@nowhere.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
AFAIK you should have a SQL Job that cleans up old data. Double check the
SQL scripts...

Patrice

--

"Wardeaux" <wa******@bellsouth.net> a écrit dans le message de
news:uf*************@TK2MSFTNGP10.phx.gbl...
I'm wanting to use SQL to store session variables. This works well

because
it maintains session variables even though a session times out but the
browser is still open
When a session.entry in the sql table ASPStateTempSessions is

automatically
removed whenever the browser calls "Session.Abandon"... this is good,

but the session entry is left when the browser is closed by the user thus

ending
the session. How do the entries eventually get cleaned up in the
ASPStateTempSessions table? I can't just have them accumulating over the years...

anyone use this feature before and has a solution?

MTIA
wardeaux



Nov 18 '05 #6
if you executed the SQL file as described in the documentation (MSDN or
70-305 / 70-315) the sql server agent wil start a clean job for expired
sessions


"bruce barker" <no***********@safeco.com> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
generally its scheduled with SQLAgent. use sql enterprise manager under
magament->sql server agent ->jobs you should find the sp scheduled to run.
if not add it.

-- bruce (sqlwork.com)

"Wardeaux" <wa******@bellsouth.net> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl...
Patrice,
Thanks for the reply... I see a script "DeleteExpiredSessions" in the
ASPState db... does this get run automagically (if so... when) or do I

need
to run/schedule this (if so... how)?
I'm only lightly familiar with SQL so any help is GREATLY appreciated! :) MTIA
wardeaux
BTW, I'm not familiar with "AFAIK", what does that stand for?

"Patrice" <no****@nowhere.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
AFAIK you should have a SQL Job that cleans up old data. Double check the SQL scripts...

Patrice

--

"Wardeaux" <wa******@bellsouth.net> a écrit dans le message de
news:uf*************@TK2MSFTNGP10.phx.gbl...
> I'm wanting to use SQL to store session variables. This works well
because
> it maintains session variables even though a session times out but the > browser is still open
> When a session.entry in the sql table ASPStateTempSessions is
automatically
> removed whenever the browser calls "Session.Abandon"... this is good, but
> the session entry is left when the browser is closed by the user
thus ending
> the session. How do the entries eventually get cleaned up in the
> ASPStateTempSessions table? I can't just have them accumulating

over the
> years...
>
> anyone use this feature before and has a solution?
>
> MTIA
> wardeaux
>
>



Nov 18 '05 #7

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

Similar topics

0
by: Kristofer Liljeblad | last post by:
Hi, I've successfully setup my machine to use: sessionState mode="SQLServer". All is up and running so no problems so far. Because I curious person, I started to play around with the two new...
1
by: TSelvan | last post by:
Hi All, We have developmented Web project with ASP.Net and SQL server Database. In this project we have configured "SessionState" mode as "SQLServer" in Web.Config with timeout="180" as...
0
by: Phl | last post by:
Hi, I am having some problems hosting my website. Everything works fine in my local machine but when I upload to propduction server, my images somethimes won't load properly. I have my state...
1
by: Craig | last post by:
I'm planning on persisting sessionState in a database (not MS SQL). Is there a way to do this using the web.config file? I see that you can set the sessionState mode="SQLServer" to persist to a...
2
by: spgmbl | last post by:
I have set up the local environment to use sqlserver mode testing. The article i followed to install was here: http://support.microsoft.com/default.aspx?scid=kb;en-us;317604 I also changed the...
1
by: fathelga | last post by:
We have a site that holds data about the user in session while they are logged in. Everyone once in a while a user will log in and see someone else's session state. Has this happened to anyone...
1
by: Ed | last post by:
I am trying out SessionState with Mode=SQLServer. I have my code run Session.Abandon, but the session entry in the table ASPStateTempSessions is still there? I was expecting that Session.Abandon...
2
by: teo | last post by:
I need to use the 'Session_End' event in the 'Global.asax' file. It only works if in the 'Web.config' file the 'sessionState mode' Tag is present and its value is set to "InProc" 1) I...
2
by: =?Utf-8?B?U3Bpcml0RmxhZw==?= | last post by:
I want to configure different sessionState on different subdirectory,so I wote this code in wen.config file: <location path="SubInProc"> <system.web> <sessionState mode="InProc"...
3
by: Moe Sisko | last post by:
Using dotnet 2.0 sp1, I've got ASP.NET session state working ok in SQLServer mode, but the sessions never seem to expire. e.g if I add a timeout attribute like so : <sessionState...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.