472,791 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

need guidance on users "session data" management.


I need to keep track on user "session data" while still turning session off
as
i do not want users login to expire?
Thanks

JB
Nov 19 '05 #1
5 1817
You could store this information in a cookie written to the user's browser.
If there is much data to be stored you'd store some key in the cookie and
the rest in a database mapped to the key.

hope this helps,
mortb

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:O8*************@TK2MSFTNGP15.phx.gbl...

I need to keep track on user "session data" while still turning session
off as
i do not want users login to expire?
Thanks

JB

Nov 19 '05 #2
Hi JB,

I think you will need to rethink your plan. There is a reason that Sessions
time out. Each Session has a certain amount of memory overhead associated
with it. If Sessions never time out, you've created a custom Memory Leak in
your app. Every time a Session is initiated, it adds to the memory overhead.
And with no way to remove a Session, the memory overhead keeps building
until your system is out of memory.

The reason that Sessions time out is that HTTP is stateless. Each Request
happens "in a vacuum" so to speak. The server has no way of knowing whether
or not the client is even there until it receives a Request. SessionState
was created to emulate statefullness for a given client. It (generally, by
default) creates a Session cookie on the client, which is sent with each
Request, identifying the Session (Memory block) that belongs to that client.
Once the client stops sending Requests, the Session kills itself after the
Timeout interval. The lack of Requests is the only way the server-side app
can know that the client has "gone away" so to speak.

There are methods you can employ to prevent Sessions timing out between
Requests, such as using a META Refresh tag on the client to re-Request the
page after an interval of < Session Timeout. Once the user navigates away
from the page, or closes their browser, it stops sending fresh Requests, and
the Server Session for that client times out and kills itself. Of course,
there are times when you don't want to send a fresh Request for the page, as
it may be in an "internediate" state (between PostBacks). In a case such as
that, you would use PostBacks to refresh the Session. This can be done using
client-side JavaScript and the JavaScript setTimeout() function.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:O8*************@TK2MSFTNGP15.phx.gbl...

I need to keep track on user "session data" while still turning session
off as
i do not want users login to expire?
Thanks

JB

Nov 19 '05 #3

"mortb" <mortb1<noospam<@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You could store this information in a cookie written to the user's
browser.
If there is much data to be stored you'd store some key in the cookie and
the rest in a database mapped to the key.

hope this helps,
mortb


Well thanks mortb,
My client uses governements pc and there very stric restriction on what can
be written to these pcs. No cookies allowed .
I described my senario in an early post but will recall it again.

One of my pages allow a pop up window wich in fact is a news bticker. It
holds an advanced dhtml rotator that scolls into database news.
It does refresh every hour.
It should not prompt users fo login again as the news ticker is supposed to
be
continuously running on users desks.

But i have not yet succeeded to achieve this.

My session times out although a refresh is issued before the session
expires.

so what to do in this case?

My purpose is not prompt users with login "again" a la "yahoo.com/mail"

Many thanks
JB
Nov 19 '05 #4
> I think you will need to rethink your plan. There is a reason that
Sessions time out. Each Session has a certain amount of memory overhead
associated with it. If Sessions never time out, you've created a custom
Memory Leak in your app. Every time a Session is initiated, it adds to the
memory overhead. And with no way to remove a Session, the memory overhead
keeps building until your system is out of memory.

Turning session off should hoppefully not creat memory leak?

The reason that Sessions time out is that HTTP is stateless. Each Request
happens "in a vacuum" so to speak. The server has no way of knowing
whether or not the client is even there until it receives a Request.
SessionState was created to emulate statefullness for a given client. It
(generally, by default) creates a Session cookie on the client, which is
sent with each Request, identifying the Session (Memory block) that
belongs to that client. Once the client stops sending Requests, the
Session kills itself after the Timeout interval. The lack of Requests is
the only way the server-side app can know that the client has "gone away"
so to speak.
Well i do refresh before the session is set to expire but, that does not
stop i from expiring.
What i'm i doing wrong?
There are methods you can employ to prevent Sessions timing out between
Requests, such as using a META Refresh tag on the client to re-Request the
page after an interval of < Session Timeout. Once the user navigates away
from the page, or closes their browser, it stops sending fresh Requests,
and the Server Session for that client times out and kills itself. Of
course, there are times when you don't want to send a fresh Request for
the page, as it may be in an "internediate" state (between PostBacks). In
a case such as that, you would use PostBacks to refresh the Session. This
can be done using client-side JavaScript and the JavaScript setTimeout()
function.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

Nov 19 '05 #5
> Turning session off should hoppefully not creat memory leak?

No, but creating your own custom Session that doesn't time out will.
Well i do refresh before the session is set to expire but, that does not
stop i from expiring.
What i'm i doing wrong?


I have no idea. There's many a slip twixt the cup and the lip. IOW, you have
a bug in your code somewhere, but I don't know where, as I'm not psychic.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:up**************@TK2MSFTNGP14.phx.gbl...
I think you will need to rethink your plan. There is a reason that
Sessions time out. Each Session has a certain amount of memory overhead
associated with it. If Sessions never time out, you've created a custom
Memory Leak in your app. Every time a Session is initiated, it adds to
the memory overhead. And with no way to remove a Session, the memory
overhead keeps building until your system is out of memory.


Turning session off should hoppefully not creat memory leak?

The reason that Sessions time out is that HTTP is stateless. Each Request
happens "in a vacuum" so to speak. The server has no way of knowing
whether or not the client is even there until it receives a Request.
SessionState was created to emulate statefullness for a given client. It
(generally, by default) creates a Session cookie on the client, which is
sent with each Request, identifying the Session (Memory block) that
belongs to that client. Once the client stops sending Requests, the
Session kills itself after the Timeout interval. The lack of Requests is
the only way the server-side app can know that the client has "gone away"
so to speak.


Well i do refresh before the session is set to expire but, that does not
stop i from expiring.
What i'm i doing wrong?
There are methods you can employ to prevent Sessions timing out between
Requests, such as using a META Refresh tag on the client to re-Request
the page after an interval of < Session Timeout. Once the user navigates
away from the page, or closes their browser, it stops sending fresh
Requests, and the Server Session for that client times out and kills
itself. Of course, there are times when you don't want to send a fresh
Request for the page, as it may be in an "internediate" state (between
PostBacks). In a case such as that, you would use PostBacks to refresh
the Session. This can be done using client-side JavaScript and the
JavaScript setTimeout() function.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.


Nov 19 '05 #6

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

Similar topics

0
by: Magnus Warker | last post by:
Hi, after searching the web without finding what I'm looking for, I ask for help in this group. I would like to use phplib for authentication and session management. What I need, is a minimal...
2
by: ben moretti | last post by:
hi i'm learning python, and one area i'd use it for is data management in scientific computing. in the case i've tried i want to reformat a data file from a normalised list to a matrix with some...
0
by: john bailo | last post by:
This is a (*) PERSISTANT (*) UNRESOLVED (*) ILL EXPLAINED PROBLEM WITH SQL SERVER. THE POSTED WORKAROUNDS DO NOT WORK. THE SUGGESTED SOLUTIONS ARE IDIOTIC AND BASICALLY MAKE EVERYTHING...
5
by: Abhilash.k.m | last post by:
This is regarding the session management using Out of proc session management(SQL SERVER). Among the samples below which one is better to set the session? 1. There are 20 session...
1
by: Akshay Kumar | last post by:
Hi All, I was reading Perforance and Scalability Guide and reading Session State Management section. It says use SQL Server when using Web farm . No where are the metrics and the Why's are...
1
by: ReinaldoCL | last post by:
Hello, I'm looking for a posibility to use session objects or cookies in a C# program on Pocket PC, that use a web service method with session enabled property. But the .NET Compact Framework...
0
by: Jamie White | last post by:
I've written a web service for handling user authentication and session management. Now I'm wondering if this was such a good idea for performance and security. This ws will be instantiated and...
2
by: satisharas | last post by:
Hello, I am trying to write a custom session manager in ASP.NET 2.0 using oracle as the backend. I want to know how the session expires in web garden and we are using NLB (a session can be...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.