Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Can I replace session object with profile object ASP.NET 2.0

Back to Forum: Tech Off
  • User profile image
    Amresh

    Am migrating from ASP.NET 1.x to ASP.NET 2.0, I used to store certain user details like language chosen, user Id etc in SESSION, can i replace it with Profile Object in ASP.NET 2.0.

    What are the disadvangages ? How about the performance ?

  • User profile image
    blowdart

    Amresh wrote:
    Am migrating from ASP.NET 1.x to ASP.NET 2.0, I used to store certain user details like language chosen, user Id etc in SESSION, can i replace it with Profile Object in ASP.NET 2.0.

    What are the disadvangages ? How about the performance ?


    Advantages :

    • They will persist (assuming you all anonymous users to have a profile, and the user does not clear the cookie)
    • It provides a unique user ID for you.
    • You don't need to cast objects, profile objects are strongly typed.

    Disadvantages :

    • You need a SQL backend, or a custom provider to store it all.
    • Therefore the initial lookup can be expensive (although it should get cached)
    • If you were expecting to garner statistics on profile options saved in the database the actual database structure for profile items is really really ugly.



  • User profile image
    Amresh

    Performance

    Profile
    Profile may have a negative impact on performance because of the chatty interface between the profile object and the persistent data store

    Session

    Can be configured using properties such as EnableSessionState attributes at the page level



    Any Input to this.......

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.