Results 1 to 5 of 5

Thread: Session_End

  1. #1

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Session_End

    Does Session_End even fire in ASP.Net I Applicastion_End is wishfull thinking but I thought Session_End worked.

    I have a datbase table that holds user information based on SessionID.The users row is Setup in Session_Start and should be dropped on session_End but well it isn't getting dropped. At least not when I launch to debug from vs.net. I just ran it live from a remote machine and am waiting to see it drop.

    Anybody have any thoughts on this?
    Magiaus

    If I helped give me some points.

  2. #2

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    Well I don't know what the problem is but I don't have time to not code and test to mess with it. What I am going to do is set an Application_Wide Timer That exectues say 5 minutes hit the Session data table and checks a field last request and if it was longer then 20 ago it gets dropped.
    Magiaus

    If I helped give me some points.

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Session by default times out at 20 minutes I believe.

    The session end event is slightly flaky in my opinion. How can a site "truely" be sure that a user is still there or left a while ago?

    The only true way is to expire the session after so long of inactivity.

    What you are attempting to do is already built in. Check the web.config file for a session timeout element. I am unsure on the correct name though.

  4. #4

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    So your saying lower the session timeout to say 5 minutes and then provided my sql works it should work.

    I just got done setting up trace logs for data and application errors so I'm hoping that I'll be able to see what is happining. The drop may be firing and causing an error I couldn't see before.

    I was reading about ussing the SQLServers TempDB for session state but I am haven't asked my host if they allow it yet.
    Code:
    <configuration>
         <system.web>
               <sessionState mode="SQLServer" sqlConnectionString="data source: ip/serverName;user id=sa;password=;"/>
         </system.web>
    </configuration>
    they have to run InstallSqlState.sql

    I may just go that way save me some db space
    Magiaus

    If I helped give me some points.

  5. #5
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Only InProc session persistance fires the Session_End event...storing session in SQL does not fire the event when it expires.

Posting Permissions

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



Click Here to Expand Forum to Full Width