#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    17
    Rep Power
    0

    ASP.NET Website timeout issue and Global.asax file


    Hey guys, Im currently in development on a website using ASP.NET Web Forms. The site looks great and everything is coming together cleanly. The site is live, however, it's invite only, so I can't point anyone to a URL. Here's my issue:
    I'm having some sort of timeout issue on my website, I'm not sure if it's Session timeout or something to do with an IIS application timeout. I just don't know. When I'm on a page, if the page sits for about 5 minutes(i'm guessing) with inactivity and I click a button, the site reverts back to my default.aspx login page... In my web.config file, I have the forms authentication and session timeouts set to like 60 minutes... What could be causing this issue???

    Also, I would like to run some code in my Global.asax file on the Session End event. I would like to access my database to log the user out. I use Linq to Sql to talk to my database, is it possible to do this in the Global.asax file?? If so, how?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    17
    Rep Power
    0
    FYI, on every page, in the PageLoad event, I have a Session check to make sure the Session is not null. If it IS null, I send them back to my Default.aspx page. This could be the issue, but I've set the Session timeout to 60 minutes in my web.config file. So are there other ways to set the Session timeout??
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,561
    Rep Power
    4550
    IIS will destroy sessions after a period of time which is configurable. 5-10 min is common. Look for the IIS setting for session timeout
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo