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. Session times out [modified]

Session times out [modified]

Scheduled Pinned Locked Moved ASP.NET
visual-studiosysadminwindows-admindebuggingquestion
7 Posts 2 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.
  • S Offline
    S Offline
    sagittarian
    wrote on last edited by
    #1

    This is what I have in web.config: Also this is the piece of code in all my page_loads after the Login, Dim emp as Employee = Session.Item("employee") If emp is Nothing Then Response.Redirect("Login.aspx") End if After like 20 seconds or so, no matter whatever page I am in, if I click a button or something to cause a Postback I am redirected to the Login page. Am I missing something here? I am using VS 2005, IIS 6.0 (on a remote server) 1. I have checked the server, it shows time out of 20 mins 2. If I add a breakpoint at Session_End event in my Globals.asax its hit after 15-20 secs and Application_End event is hit immediately Thanks for reading!

    S H 4 Replies Last reply
    0
    • S sagittarian

      This is what I have in web.config: Also this is the piece of code in all my page_loads after the Login, Dim emp as Employee = Session.Item("employee") If emp is Nothing Then Response.Redirect("Login.aspx") End if After like 20 seconds or so, no matter whatever page I am in, if I click a button or something to cause a Postback I am redirected to the Login page. Am I missing something here? I am using VS 2005, IIS 6.0 (on a remote server) 1. I have checked the server, it shows time out of 20 mins 2. If I add a breakpoint at Session_End event in my Globals.asax its hit after 15-20 secs and Application_End event is hit immediately Thanks for reading!

      S Offline
      S Offline
      sagittarian
      wrote on last edited by
      #2

      Nobody ha! :-( I posted the same question in the Asp.net forums. Is my problem weird or am I being just plain stupid???

      1 Reply Last reply
      0
      • S sagittarian

        This is what I have in web.config: Also this is the piece of code in all my page_loads after the Login, Dim emp as Employee = Session.Item("employee") If emp is Nothing Then Response.Redirect("Login.aspx") End if After like 20 seconds or so, no matter whatever page I am in, if I click a button or something to cause a Postback I am redirected to the Login page. Am I missing something here? I am using VS 2005, IIS 6.0 (on a remote server) 1. I have checked the server, it shows time out of 20 mins 2. If I add a breakpoint at Session_End event in my Globals.asax its hit after 15-20 secs and Application_End event is hit immediately Thanks for reading!

        H Offline
        H Offline
        Herman T Instance
        wrote on last edited by
        #3

        place the page_load code in page_init event handler Put the code in an IF statement IF NOT Page.IsPostBack is Nothing

        S 1 Reply Last reply
        0
        • H Herman T Instance

          place the page_load code in page_init event handler Put the code in an IF statement IF NOT Page.IsPostBack is Nothing

          S Offline
          S Offline
          sagittarian
          wrote on last edited by
          #4

          Thank you so much for the reply! 1. I already have that IF block and porting that piece of code to Page_Init did not solve my problem. 2. No matter what I do (even if I do nothing/keep causing postbacks), Session_End event in my Global.asax is hit in like 20 seconds or so, EVERY time. I am confused. It used to work well with VS 2003. I have both installed in my PC, btw and my IIS version is 6.0 and I have configured my IIS for this particular project to be of Version 2.0

          1 Reply Last reply
          0
          • S sagittarian

            This is what I have in web.config: Also this is the piece of code in all my page_loads after the Login, Dim emp as Employee = Session.Item("employee") If emp is Nothing Then Response.Redirect("Login.aspx") End if After like 20 seconds or so, no matter whatever page I am in, if I click a button or something to cause a Postback I am redirected to the Login page. Am I missing something here? I am using VS 2005, IIS 6.0 (on a remote server) 1. I have checked the server, it shows time out of 20 mins 2. If I add a breakpoint at Session_End event in my Globals.asax its hit after 15-20 secs and Application_End event is hit immediately Thanks for reading!

            S Offline
            S Offline
            sagittarian
            wrote on last edited by
            #5

            Adding something which I think is relevant My website is under the Default Website group in IIS and when I right-click on the default web sites to view the properties, it shows the ASP.Net version as 1.1 and the new website I am developing is on VS2005 and framework 2.0. Problem, is it?

            H 1 Reply Last reply
            0
            • S sagittarian

              Adding something which I think is relevant My website is under the Default Website group in IIS and when I right-click on the default web sites to view the properties, it shows the ASP.Net version as 1.1 and the new website I am developing is on VS2005 and framework 2.0. Problem, is it?

              H Offline
              H Offline
              Herman T Instance
              wrote on last edited by
              #6

              can be. via start->run->cmd go to cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 run aspnet_regiis -i framework 2.0 is now default.

              1 Reply Last reply
              0
              • S sagittarian

                This is what I have in web.config: Also this is the piece of code in all my page_loads after the Login, Dim emp as Employee = Session.Item("employee") If emp is Nothing Then Response.Redirect("Login.aspx") End if After like 20 seconds or so, no matter whatever page I am in, if I click a button or something to cause a Postback I am redirected to the Login page. Am I missing something here? I am using VS 2005, IIS 6.0 (on a remote server) 1. I have checked the server, it shows time out of 20 mins 2. If I add a breakpoint at Session_End event in my Globals.asax its hit after 15-20 secs and Application_End event is hit immediately Thanks for reading!

                S Offline
                S Offline
                sagittarian
                wrote on last edited by
                #7

                If at all anyone else bangs their head for a similar issue, here is the magic wand. Pull out the Event log in the Server box. It showed, Event Type: Information Event Source: W3SVC Event Category: None Event ID: 1077 Date: 4/3/2008 Time: 11:18:13 AM User: N/A Computer: LABHONTS2005A Description: A worker process with process id of '11468' serving application pool 'mkasivii2_0' has requested a recycle because it reached its virtual memory limit. So this thing causes the session to recycle, so you should contact the server people. Hope this helps another frustrated developer ;) :sigh:

                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