Session times out [modified]
-
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!
-
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!
Nobody ha! :-( I posted the same question in the Asp.net forums. Is my problem weird or am I being just plain stupid???
-
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!
place the page_load code in page_init event handler Put the code in an IF statement IF NOT Page.IsPostBack is Nothing
-
place the page_load code in page_init event handler Put the code in an IF statement IF NOT Page.IsPostBack is Nothing
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
-
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!
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?
-
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?
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.
-
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!
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: