Professional Web Applications Themes

session_onend event not firing - ASP.NET General

I've got code in my session_onend event that clears out database entries based on the sessionID that just expired. The code works in the development environment, but doesn't work in the production envrionment. Anyone have any ideas of what to check? No errors are being reported, just not firing... :-( Thanks!...

  1. #1

    Default session_onend event not firing

    I've got code in my session_onend event that clears out
    database entries based on the sessionID that just
    expired. The code works in the development environment,
    but doesn't work in the production envrionment. Anyone
    have any ideas of what to check? No errors are being
    reported, just not firing... :-(

    Thanks!
    rob Guest

  2. #2

    Default Re: session_onend event not firing

    Is the live environment using out-of-process Sessions by any chance?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "rob" <com> wrote in message
    news:03e301c36cda$d4afd7b0$gbl... 


    Kevin Guest

  3. #3

    Default Re: session_onend event not firing

    "rob" <com> wrote 

    Rob,
    What is different between the development and production envrionments?
    Does the production envrionment have an IIS Application or Virtual Directory?
    Does the production envrionment using inproc, out-of-process session?

    Try calling Session.Abandon directly and see if the event fires. Otherwise,
    the Session_End event will fire after the Session times out, or the application
    is restarted.

    Also, you typed "session_onend". Did you mean "Session_End"?
    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
    ' Fires when the session ends
    End Sub

    --

    Thanks,
    Carl Prothman
    Microsoft ASP.NET MVP
    http://www.able-consulting.com



    Carl Guest

  4. #4

    Default Re: session_onend event not firing

    I'm using inproc session, and disabled cookies. The difference between
    the two environments are vast - the dev environment is a win XP machine
    with a virtual directory. The production machine is a win 2003 machine
    with a website. In reference to the session_onend vs. session_end, I
    tried them both. The microsoft site uses the onend, and other sites use
    just end - neither worked in the production environment. I'll try the
    session.abandon and see what happens...

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    rob Guest

  5. #5

    Default Re: session_onend event not firing



    Session.Abandon() does not fire the event in production - UGGG!!!

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    rob Guest

  6. #6

    Default Re: session_onend event not firing

    If you go into your Internet Services Manager find your virtual directory
    open the property pages and on the Virtual Directory tab theres a section
    called Application Settings.... If you click Configuration you get another
    dialog that has an App Options tab is the check box that says Enable session
    state checked..? If not check it... What is the timeout setting...? Try
    opening up Perfom and adding a active sessions hook for asp.net
    applications... you should be able see the active sessions based on the
    instance or virtual directory..... Do you have any active sessions...?


    "rob" <com> wrote in message
    news:03e301c36cda$d4afd7b0$gbl... 


    alien2_51 Guest

  7. #7

    Default session_onend event not firing

    Change the mode="stateServer" and Datasource = localhost..
    instead of 127.0.0.1

    Setting goes like this
    <SessionState
    mode="StateServer"
    stateConnectionString="tcpip=127.0.0.1:42424"
    sqlConnectionString="data
    source=localhost;user id=sa;password="
    cookieless="false"
    timeout="60"

    />
     
    Anand Guest

Similar Threads

  1. LoadControlState Event Not Firing?
    By seraphimrhapsody@gmail.com in forum ASP.NET Building Controls
    Replies: 1
    Last Post: May 23rd, 03:34 PM
  2. Click Event Not Firing
    By Hardin Brothers in forum ASP.NET Building Controls
    Replies: 2
    Last Post: February 10th, 04:10 PM
  3. SelectedIndexChanged event not firing
    By Kevin Spencer in forum ASP.NET General
    Replies: 8
    Last Post: August 4th, 07:39 PM
  4. asp.net linkbutton event not firing
    By webdad3 in forum ASP.NET Building Controls
    Replies: 1
    Last Post: July 7th, 12:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139