Application Variable

L

Lord2702

I have 20 - 25 users using my web application, and I store their UserID,
along with their SessionID in Aplications Variable. Now, My question is,
suppose if my users increase to 100, 1000, or even 10,000 then still this
system will work w/o having any memory problem ? Ofcourse when user has Log
Off, then I remove it from these arrays, but still it is possible that at a
time 1000 users may be login at a time.

Tia
 
H

Hermit Dave

i dont see any problems to your approach though i am just wondering.... what
happens if the user just closes the browser without going into the effort of
clicking the Logout button ?
Memory issues if any will be determined by what exact information you are
storing per user in the application object. if you are storing large amounts
of user specific data then you need to use a different approach

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
H

Hans Kesting

Lord2702 said:
I have 20 - 25 users using my web application, and I store their
UserID, along with their SessionID in Aplications Variable. Now, My
question is, suppose if my users increase to 100, 1000, or even
10,000 then still this system will work w/o having any memory problem
? Ofcourse when user has Log Off, then I remove it from these arrays,
but still it is possible that at a time 1000 users may be login at a
time.

Tia

Are you using Lock/Unlock when you change those stored values?
This might slow your application down when there are a lot of users.

Hans Kesting
 
L

Lord2702

My storage could be maximum 16 - 20 bytes per user, and I can shorten it
upto 8 bytes. But as Hermit mention if user close the browser w/o clicking
on Logout then How should I handle this situation ? And, what could be the
best approach to store the Login user information in ASP.Net application ? I
appreciate your reply.
 
S

Scott Allen

16-20 bytes is a relatively small amount, so I would not see any
problems there. When the user closes the browser without signing out,
you'll just have to wait for the runtime to clean up unused sessions,
there is no method for your code to call and speed up that process.
 
H

Hermit Dave

well is it essential that you store that info in Application object ?

I have had scenarios where i had to store session id and the current sorting
criteria but it was very specific requirement for a very specific user group
on a server that i had control over :). Infact given the option i would have
preferred to think of a different approach if i had sufficient time.

what i would suggest is using a database table and storing the info there.
plus you can store like log in time and last access time etc. schedule a sql
job to run every now and again say half an hour or an hour and clean up if
no activity has been registered from user

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 

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

Top