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. Fire Session_End in Global.asax

Fire Session_End in Global.asax

Scheduled Pinned Locked Moved ASP.NET
questionannouncement
2 Posts 2 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.
  • M Offline
    M Offline
    mtone
    wrote on last edited by
    #1

    I am trying to update an application object in THe Session_End Sub but it does not seem to work. If I close my browser it does not fire. Also, if I open the app again the value does not start at 0 again. Am I missing something? Why does the application object stay around after my browser was closed? Why doen't the Session_End fire when I close my browser? Thanks

    M 1 Reply Last reply
    0
    • M mtone

      I am trying to update an application object in THe Session_End Sub but it does not seem to work. If I close my browser it does not fire. Also, if I open the app again the value does not start at 0 again. Am I missing something? Why does the application object stay around after my browser was closed? Why doen't the Session_End fire when I close my browser? Thanks

      M Offline
      M Offline
      Mariusz Wojcik
      wrote on last edited by
      #2

      Closing the browser window isn't equal to close/end the session. If you do close the browser window, no information is send to server, and as HTTP is stateless and connectionless, server do not know if the client (browser window) exists or it's been closed. So the user's session object will be close after it timeout's. There's no easy way to inform the server when user closes browser. The best way is to create some logout / end button which'll destroy the session and do all cleanup things (otherwise it'll exists until timeout occurs). -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)

      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