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. Session time out

Session time out

Scheduled Pinned Locked Moved Web Development
helpquestion
6 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.
  • C Offline
    C Offline
    Chiari
    wrote on last edited by
    #1

    Hi, I'm trying to write something on Session Timeout. I want to display a message box before it redirects the page to the login page. I'm using .ASP net.I have configure the web.config under the sessionstate as timeout 1 min, but the Session_OnEnd event I wrote doesn't fire. Can anyone help me on it? Thanks in advance, Chiari

    G G 2 Replies Last reply
    0
    • C Chiari

      Hi, I'm trying to write something on Session Timeout. I want to display a message box before it redirects the page to the login page. I'm using .ASP net.I have configure the web.config under the sessionstate as timeout 1 min, but the Session_OnEnd event I wrote doesn't fire. Can anyone help me on it? Thanks in advance, Chiari

      G Offline
      G Offline
      Gavin Jeffrey
      wrote on last edited by
      #2

      Thats because the session hasn't ended and just timed out. If you close the browser window you should be able to see the event being fired.

      G 1 Reply Last reply
      0
      • C Chiari

        Hi, I'm trying to write something on Session Timeout. I want to display a message box before it redirects the page to the login page. I'm using .ASP net.I have configure the web.config under the sessionstate as timeout 1 min, but the Session_OnEnd event I wrote doesn't fire. Can anyone help me on it? Thanks in advance, Chiari

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        You can't interact with the user in any way from the Session_OnEnd method. You can't display a message box. You can't redirect any page as there is no page that is created. Once the page is sent to the browser, the server knows nothing about the page. There is no connection from the server to the page, so you can't do anything to the page once it is sent to the browser. It doesn't help that the page is still shown in the browser, the server doesn't know that. I'm sure that the Sesson_OnEnd event fires just fine, but you are trying to do something that simply is not supported by the http protocol. --- b { font-weight: normal; }

        C 1 Reply Last reply
        0
        • G Gavin Jeffrey

          Thats because the session hasn't ended and just timed out. If you close the browser window you should be able to see the event being fired.

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Closing the browser window doesn't fire the Session_OnEnd event. --- b { font-weight: normal; }

          1 Reply Last reply
          0
          • G Guffa

            You can't interact with the user in any way from the Session_OnEnd method. You can't display a message box. You can't redirect any page as there is no page that is created. Once the page is sent to the browser, the server knows nothing about the page. There is no connection from the server to the page, so you can't do anything to the page once it is sent to the browser. It doesn't help that the page is still shown in the browser, the server doesn't know that. I'm sure that the Sesson_OnEnd event fires just fine, but you are trying to do something that simply is not supported by the http protocol. --- b { font-weight: normal; }

            C Offline
            C Offline
            Chiari
            wrote on last edited by
            #5

            Is there a solution for me? I want the message box to be show and redirect to the login page after the session time out. Thanks, Chiari

            G 1 Reply Last reply
            0
            • C Chiari

              Is there a solution for me? I want the message box to be show and redirect to the login page after the session time out. Thanks, Chiari

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              You can't send anything from the server to the client without the client asking for it. You could request the status from the server periodically, but then the session would never time out, so you would have to manage the timeout completely by yourself. --- b { font-weight: normal; }

              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