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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Session Variable Problem

Session Variable Problem

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-net
8 Posts 5 Posters 0 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.
  • J Offline
    J Offline
    jitendrapatel
    wrote on last edited by
    #1

    Hi, wud anybody help me. I have problem of session variable in my asp.net project. I use session variable to pass values of some variable to another page. It is working fine. but after some time it expires. Is there another way to use variable without stroing in sessin variable and that variable will be used in all foms. Give me right solution please. Thanks in advance. J. A. Patel

    M 1 Reply Last reply
    0
    • J jitendrapatel

      Hi, wud anybody help me. I have problem of session variable in my asp.net project. I use session variable to pass values of some variable to another page. It is working fine. but after some time it expires. Is there another way to use variable without stroing in sessin variable and that variable will be used in all foms. Give me right solution please. Thanks in advance. J. A. Patel

      M Offline
      M Offline
      MoustafaS
      wrote on last edited by
      #2

      You can put it in the global.asax .

      J 1 Reply Last reply
      0
      • M MoustafaS

        You can put it in the global.asax .

        J Offline
        J Offline
        jitendrapatel
        wrote on last edited by
        #3

        Hi, Thanks for advise. But my problem is that the values of variables are remain same for whole application. The values are stored as per userloginid and password. So for every user there is variables which stored loginid, password, and other inforation. and i want that information in all pages that are after login pages. Give me better solution please. Thanks in advance again. J. A. Patel

        A P 3 Replies Last reply
        0
        • J jitendrapatel

          Hi, Thanks for advise. But my problem is that the values of variables are remain same for whole application. The values are stored as per userloginid and password. So for every user there is variables which stored loginid, password, and other inforation. and i want that information in all pages that are after login pages. Give me better solution please. Thanks in advance again. J. A. Patel

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

          If u want to store the data application level then use it http://www.codeproject.com/aspnet/cachingaspnet.asp[^]

          J 1 Reply Last reply
          0
          • J jitendrapatel

            Hi, Thanks for advise. But my problem is that the values of variables are remain same for whole application. The values are stored as per userloginid and password. So for every user there is variables which stored loginid, password, and other inforation. and i want that information in all pages that are after login pages. Give me better solution please. Thanks in advance again. J. A. Patel

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            If u want to store the data application level then use Cacheing http://www.codeproject.com/aspnet/cachingaspnet.asp[^]

            1 Reply Last reply
            0
            • A Anonymous

              If u want to store the data application level then use it http://www.codeproject.com/aspnet/cachingaspnet.asp[^]

              J Offline
              J Offline
              jitendrapatel
              wrote on last edited by
              #6

              The solution given by u is not as i want. i want another solutions. J. A. Patel

              T 1 Reply Last reply
              0
              • J jitendrapatel

                Hi, Thanks for advise. But my problem is that the values of variables are remain same for whole application. The values are stored as per userloginid and password. So for every user there is variables which stored loginid, password, and other inforation. and i want that information in all pages that are after login pages. Give me better solution please. Thanks in advance again. J. A. Patel

                P Offline
                P Offline
                Paul Lyons
                wrote on last edited by
                #7

                You could use an encrypted cookie to persist the data and explicitly set an expiration date/time. I assume you are doing this for authentication purposes... ? Have you got your web.config set properly, deny all anonymous request, accept all authenticated requests... Have a look here[^]

                Paul Lyons, CCPL
                Certified Code Project Lurker

                1 Reply Last reply
                0
                • J jitendrapatel

                  The solution given by u is not as i want. i want another solutions. J. A. Patel

                  T Offline
                  T Offline
                  tigertwareg
                  wrote on last edited by
                  #8

                  i think that the best way to pass user information is to use session param : session["username"], session["profile"]... hope it will help TG

                  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