Is it right to used Session to stored the user info?

B

Benny Ng

Hi,all,
In the traditional ASP development.We usually used Session to stored the
user info(user name,user type,etc.). And in the .NET development. We perfer
to used Session or Cache to stored it?
And some articles prompted that this two methods also can solved
that.But i really don't know which is the best choice for my application
development.
And an application block that named "Cache Application Block" is
launched in the Enterprise Library. Is it same as the Cache Object in the
..NET platform? It just a encapsulated?

Any suggestion for this are appreciated.

Thank you.

Benny Ng
 
H

Hans Kesting

Benny said:
Hi,all,
In the traditional ASP development.We usually used Session to
stored the user info(user name,user type,etc.). And in the .NET
development. We perfer to used Session or Cache to stored it?

Session by all means. This is user-specific, where Cache is shared
between all sessions. If you store user-info in Cache, then all users
would use the same user-data.

Note: In classic ASP you would (or at least: I would :) ) store separate
strings and other values. In ASP.Net you could also store some "UserObject"
containing all values for this user under a single Session-key.

Hans Kesting
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top