.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

session timeout issue

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :ASP.Net


<sessionState mode="InProc" cookieless="false" timeout="20"/> 

I have put the above in my web config file. But my session timeout in less than a minute. are there any other changes to be made or added somewhere .

Please advise.

View Complete Post

More Related Resource Links

Session Timeout Issue in C#


In my application user upload movies and the size of movies can be around 100MB or more. For this reason im doubtful that if any user have a slow connection it could take hours and if it takes so much time then my application session will be expired. What should i do to cater this issue? My application is on ASP.Net MVC2 with C# and hosted on Windows server 2008

How to set session timeout and clear session in asp.net C# ? And kill session when close the web app


hi ,

How to set session timeout and clear session in web.config and login.aspx  ? And when we close the web application , the session must be cleared ?

I have use session.abandon as per below but is not working . Pls advise .


        protected void btnLogout_Click(object sender, EventArgs e)



Session Issue


In my web application, I set the mode of session state as State Server and point to another server. After run some days, I always meet following exception:

The state server has closed an expired TCP/IP connection. The IP address of the client is The expired Read operation began at 08/25/2010 14:18:03.

How to resolve the issue?


session timeout


hi there,

is it possible that session time out is calculated in seconds and not in minutes?

i am setting it at web.config, global.asax, default.aspx and at the web server to 30 (minutes) and session last exactly for 30 seconds.



Session Timeout increase to 2 hours.



    for Business needs i am planning to increase the session timeout to 2 hours(120 min) in one application, i am using sql server session state. if i increase to 2 hours of session time out, how it will effect the performance of application and web server.

   Could any one help me on this.






Warning users before Session Timeout

Hi, In my web application, I want to alert users 5 minutes before their session timeout. If the users want, they can either extend their session or ignore the message - in which case after session timeout they will be redirected to the login page (I'm also using forms authentication in my site, so have set the authentication cookie expire time to the session timeout). I know I can do the alert with window.setTimeout, but I want to get user's respond and refresh the page if they want a session extension. How can I do that, in which event and whether I can do this in C# code behind. And also, should I implement this in the base page or somewhere else? How can I implement the auto page refresh - should I use a hidden button and click it from Javascript? It's great if someone can give a sample code for this.  

Dialup/Earthlink 65534 Timeout issue..

I'm not sure where else to go on this. We've got ~50 locations that have a working synch application that brings in data from SqlExpress2005 db's to our production Sql Server 2005. It has and does work fine in most locations that are on 56k leased lines. One location, however; is dialup through Earthlink. The synch runs fine until it synchs data with one table..Sale_item. It synchs some records but not all. On the one record, I see (through debug msg's boxes I coded) that it's trying to insert into the prod db here. I watch in activity monitor and there's nothing that is blocking. I have the db timeout set to zero (which I thought meant no timeout) so I'm not sure what else to try. It synchs by finding which keys are on prod and which are on the plant and issuing I,U,D's as needed.

ADO NET Destination Timeout issue

I am using SSIS 2008 R2 to migrate data from Orcale to SQL 2008 R2. when is execute paralle data during package exection i am getting follow error. Source: ADO NET Destination [16] Description: An exception has occurred during data insertion, the message returned from the provider is: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated. so, i changed the parallel to sequential data flow task execution in my package. it was working fine. i wonder today that same issue is popping up on my screen. what could be the issue? can you please help me to resolve?

SQL Server Express 2005 connection timeout issue.

Client: Sql Sever Management Studio Express 2005 (SSMSE) on Vista Server: Sql Server 2005 Express on Windows Server 2008 Standard When I first try to log into SSMSE from the client machine, the login operation times out. When I retry, the login succeeds almost immediately. If I close the app and re-open it, the same thing happens. This appears to be infinitely repeatable. I am able to reproduce this behavior using SQLCMD.exe. Here's the error: "Timeout expired. The timeout elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server)" The technical details reference Error Number -2 What may be unique or tricky about this client's network is that it's a mixture of IPv4 and IPv6. I believe the server is configured for both, but honestly the networking side of things is outside of my expertise. Has anyone else experienced a problem like this? I'm looking for some troubleshooting tips and of course a flat-out answer :-). Thank you in advance for your time and expertise - I hope I've broken the problem down to its simplest form. Will.

Ajax Session timeout problem

Hi,  I have some problems when using AJAX with updatepanels. I have an ASP.NET webapplication with a login that uses form authentication with the timeout set to 5 min. After 5 min of idle the site should be redirected to the login.aspx page. My problem is that after using the site for 5 minutes when clicking on contents inside an updatepanel I get a messagebox with the following error: A Runtime Error has occurred.Do you wish to Debug? Line: 4723Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12031  I think that it has something to do with the ajax updatepanel since when I remove the updatpanels this problem does not appear. Instead the site is redirected to login.aspx as expected. When searching on the problem on google I see alot of people having similar problem, but I haven't found suitable solution. Any suggestions?

Asp.net Pages Getting session timeout

in my website there is a folder which requires authunteication/jobseekers/but after sometimes, the session("cid") is "", that means there is no value of candidate in the session("cid") field, but iam able to browse the jobseeker folderiam not using asp.net default authenticaiton method, iam manualy authenticating themnow my concern iswhen there is no value in session("cid") the user must be prompted to login againhow can that be doneif put a check in master page for session("cid")but i also have login.aspx in that jobseekers folderso do i need to have login.aspx page outside the jobseeker folder and shall i write session("cid") in master page

modal popup extender..session timeout

hi, i actually want to give a popup 2 min before the session timeout, i have actually found out a way to do that but i want to use modal pop up extender instead of javascript....... how should i use this,how do i create the pop up window first and then how do i call it from page load of each page, what should be the targetcontrolid,please help me out.   thank you

Asp.net Ajax and session timeout

Hi, How do I handle a session timeout when using a updatepanel ?When the user session has timed-out and I click a button I get this error Sys.WebForms.PageRequestManagerParserErrorException - The message received from the server could not be parsed.I have tried to set EnabledEventValidation to false on the page but that didnt work, I have also tried to override the preInit on the page...didnt work either.Any ideas ?

IIS 5.1 PHP Killed my session Timeout!

 I followed the instructions to install php on IIS5.1 at php.net and ever since my asp.net sessions keepalive seems to die after 60 seconds of inactivity? Please help.

Check session timeout and warn user before timeout


I know there are several articles explaining how to warn the user before their session times out, but so far none of them have worked for our scenario, so I'm hoping someone here will be able to help me figure this one out...  Here's what we've got:

Our application uses SQLServer to store session state.  We've got it set to timeout in 60 minutes.  Unfortunately (I fought hard against this, but lost the battle) our application uses popups for several major screens.  So tracking the session timeout on the client side doesn't really work, because I have no idea what window the user is in at any given point.  I've tried the solution where you inject Javascript into the page using the current session timeout on each request, but again, because the user could be actively using the application in a different window, it doesn't work for us.  So I guess I have a couple key questions:

  1. Is there any way to get the timeout for a session without triggering a request to the server, which would just renew the session?
  2. Is there a way to track the session timeout value across multiple windows? 
    I believe there is a limit to the number of "branches" the main window can have in our app.  In other words, the user can only be 2 levels deep from the main/root window, s

Set session Timeout and Auto Redirect



I am creating web application. In that I want to set session timeout (not idle timeout). If a user logged in that time the session time will start and it automatically should detect session timeout the page should redirect to another page. How can I acheive this.

Alert on session timeout


Im implementing a minor function that SHOULD be no problem at all. However, I cant get it to work.

Currently, when a users session times out, they get redirected to our login screen. However, I want to add an alert box that tells the user why they were logged out. I want to place the code for this in the code behind, in the same function that checks the session. Currently, the code looks like this:

Protected Overrides Sub OnLoad(ByVal e As EventArgs)
        If SessionManager.User Is Nothing Then
            Response.Write("<script>alert('Session expired.');</script>")
            Exit Sub
        End If

The alert code for the alert works, but when I let my session time out, no alert shows, I just get redirected.

Im considering just redirecting to an error page, but I want to cut down the loading time as much as possible, thus I'd prefer to fire the alert as it redirects to login.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend