Tuesday, September 28, 2010

Profile Vs Session [ASP.NET]

Comparing Profile[HttpContext.Current.Profile] and Session[HttpContext.Current.Session]:
 
1) Both objects store separate data for each user of your web application without the developer having to
worry about coding for such.
2) Session often needs a small timeout value to protect the user enough, while Profile only ends at the
developer's discretion.
3) Profile allows control over clearing by inactive profiles versus active ones, time periods, etc., while
session is one or all.
4) Profile is strongly typed and Session is not.
5) At runtime, a key can be added to Session, a property for Profile must be designed in before runtime.
6) Session must load the entire dictionary to read only one value, while Profile can read just one property
efficiently (more scalable).
7) Both can store any kind of object.
 
 
use the Profile tab of the Web Site Administration Tool (WAT) to manage how your site collects personal
information about visitors. Profile properties represent data specific to a particular user. Using profile
properties enables you to personalize your Web site for individual users. The address for this web application
 

No comments: