473,396 Members | 2,034 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.

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

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
Nov 19 '05 #1
3 1065
Session is fine for typical "value" types. You can
set a class to use the ISerialize attribute and store it
in session as well.

This really only works well in a single web server
environment. For farms, I like the ScaleOut StateServer
product.

http://www.eggheadcafe.com/articles/scaleout_server.asp

--
Robbe Morris - 2004/2005 Microsoft MVP C#
Free Source Code for ADO.NET Object Mapper To DataBase Tables And Stored
Procedures
http://www.eggheadcafe.com/articles/..._generator.asp


"Benny Ng" <be**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #2
Thank you. Then i goto checkout that article. Goto study.

Benny Ng

"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:u5**************@TK2MSFTNGP09.phx.gbl...
Session is fine for typical "value" types. You can
set a class to use the ISerialize attribute and store it
in session as well.

This really only works well in a single web server
environment. For farms, I like the ScaleOut StateServer
product.

http://www.eggheadcafe.com/articles/scaleout_server.asp

--
Robbe Morris - 2004/2005 Microsoft MVP C#
Free Source Code for ADO.NET Object Mapper To DataBase Tables And Stored
Procedures
http://www.eggheadcafe.com/articles/..._generator.asp


"Benny Ng" <be**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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


Nov 19 '05 #3
Benny Ng wrote:
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
Nov 19 '05 #4

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

Similar topics

1
by: opt_inf_env | last post by:
Hello, I have a page such that each user can see only a corresponding (personal) part of the page. In the beginning I wanted to perform initialization of users (by asking there names and...
8
by: Dave Wurtz | last post by:
All, I'm new to ASP development and I have a basic design question: Is it ok to store business objects to session variables or is there a better way to keep object information? For example,...
1
by: Werner | last post by:
Hi Patrick! Can you give an example of how to use a frameset inside an aspx-file? When I create a new frameset in Visual Studio.Net it just gives me a htm-File. Or give me a link where I can...
3
by: Philip Tepedino | last post by:
I'm having an odd problem. My website's session state is getting shared between users! This problem only happens when a user tries to access the site from inside our corporate LAN. The user,...
5
by: VB Programmer | last post by:
I often use session variables to store the user's security level, and other important info. How secure are session variables? Can someone decrypt it and get the information? (This would be...
5
by: Andy G | last post by:
I have a registration page that captures 75% of the users data. After they enter that info they are redirected to one of two pages depending on how they answered a question on the registation...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
3
by: codegreen9 | last post by:
Hi, My understanding is that session info must be stored using Session, which means text data. What I'd like to be able to do, is keep an object alive throughout a user's session, without...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.