Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to keep the session objects value for a long time.

how to keep the session objects value for a long time.

Scheduled Pinned Locked Moved ASP.NET
tutorial
9 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    santu321
    wrote on last edited by
    #1

    In my application i want to keep one session objects value for a long time.I have used .But it is not working properly.can any one give some idea how to keep the value for atleast 6 to 8 hrs. thanks in advance

    _ P A 3 Replies Last reply
    0
    • S santu321

      In my application i want to keep one session objects value for a long time.I have used .But it is not working properly.can any one give some idea how to keep the value for atleast 6 to 8 hrs. thanks in advance

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      The safest way is to write them to a database - that way you can have long timeout periods simply by using a timestamp on the record.

      I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

      S 1 Reply Last reply
      0
      • S santu321

        In my application i want to keep one session objects value for a long time.I have used .But it is not working properly.can any one give some idea how to keep the value for atleast 6 to 8 hrs. thanks in advance

        P Offline
        P Offline
        padmanabhan N
        wrote on last edited by
        #3

        increase the session time in your web.config file... timeout="enter your required time here" (or) use database to store the session

        Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

        S 1 Reply Last reply
        0
        • S santu321

          In my application i want to keep one session objects value for a long time.I have used .But it is not working properly.can any one give some idea how to keep the value for atleast 6 to 8 hrs. thanks in advance

          A Offline
          A Offline
          AlexeiXX3
          wrote on last edited by
          #4

          You can also use the profile wich is saved in the database and is user level, also it remembers the user even if they close the browser (it relies on cookies to identify each user)

          Alexei Rodriguez

          S 1 Reply Last reply
          0
          • _ _Damian S_

            The safest way is to write them to a database - that way you can have long timeout periods simply by using a timestamp on the record.

            I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

            S Offline
            S Offline
            santu321
            wrote on last edited by
            #5

            Thanks for the response.I am storing the user id in the session object.now multiple user can login at the same time.Now if i store the data in the data base.How do i identify each users request.

            _ 1 Reply Last reply
            0
            • P padmanabhan N

              increase the session time in your web.config file... timeout="enter your required time here" (or) use database to store the session

              Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

              S Offline
              S Offline
              santu321
              wrote on last edited by
              #6

              Thanks for response.I am storing the user id in the session object.now multiple user can login at the same time.Now if i store the data in the data base.How do i identify each users request.

              P 1 Reply Last reply
              0
              • A AlexeiXX3

                You can also use the profile wich is saved in the database and is user level, also it remembers the user even if they close the browser (it relies on cookies to identify each user)

                Alexei Rodriguez

                S Offline
                S Offline
                santu321
                wrote on last edited by
                #7

                thanks for the response.but cookies is not reliable for every situation.

                1 Reply Last reply
                0
                • S santu321

                  Thanks for response.I am storing the user id in the session object.now multiple user can login at the same time.Now if i store the data in the data base.How do i identify each users request.

                  P Offline
                  P Offline
                  padmanabhan N
                  wrote on last edited by
                  #8

                  Refer : http://www.codeproject.com/KB/aspnet/ExploringSession.aspx#21[^] This is a very good article about about session.... This would be useful for you...

                  Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

                  1 Reply Last reply
                  0
                  • S santu321

                    Thanks for the response.I am storing the user id in the session object.now multiple user can login at the same time.Now if i store the data in the data base.How do i identify each users request.

                    _ Offline
                    _ Offline
                    _Damian S_
                    wrote on last edited by
                    #9

                    santu321 wrote:

                    I am storing the user id in the session object

                    santu321 wrote:

                    if i store the data in the data base.How do i identify each users request

                    You've answered your own question... by storing the userid in the database with the session state!

                    I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups