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 Lost

Session Lost

Scheduled Pinned Locked Moved ASP.NET
5 Posts 3 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.
  • Z Offline
    Z Offline
    Zeyad Jalil
    wrote on last edited by
    #1

    Hello, Please let me know why we lost the session in our web application after exception, notice that all the code contains try-catch block. Thank you

    K Z 3 Replies Last reply
    0
    • Z Zeyad Jalil

      Hello, Please let me know why we lost the session in our web application after exception, notice that all the code contains try-catch block. Thank you

      K Offline
      K Offline
      kaushikpathak
      wrote on last edited by
      #2

      check the timeout value of sessionstate in your web.config. May be you have given very less. Session variable doesn't depend on try catch. Its only used to handle errors.

      1 Reply Last reply
      0
      • Z Zeyad Jalil

        Hello, Please let me know why we lost the session in our web application after exception, notice that all the code contains try-catch block. Thank you

        K Offline
        K Offline
        kaushikpathak
        wrote on last edited by
        #3

        check the timeout value of sessionstate in your web.config. May be you have given very less. Session variable doesn't depend on try catch. Its only used to handle errors. In addition sessions will not work locally or on the server unless you are running https (note the S on the end of https), if you have the following in your web.config file:

        R 1 Reply Last reply
        0
        • Z Zeyad Jalil

          Hello, Please let me know why we lost the session in our web application after exception, notice that all the code contains try-catch block. Thank you

          Z Offline
          Z Offline
          Zeyad Jalil
          wrote on last edited by
          #4

          We solve the problem by change logfile location from bin to any folder outside the bin folder.

          1 Reply Last reply
          0
          • K kaushikpathak

            check the timeout value of sessionstate in your web.config. May be you have given very less. Session variable doesn't depend on try catch. Its only used to handle errors. In addition sessions will not work locally or on the server unless you are running https (note the S on the end of https), if you have the following in your web.config file:

            R Offline
            R Offline
            RichardGrimmer
            wrote on last edited by
            #5

            kaushikpathak wrote:

            In addition sessions will not work locally or on the server unless you are running https (note the S on the end of https),

            I'm sorry, but that is just absolute cobblers....nonsense

            C# has already designed away most of the tedium of C++.

            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