I use the ASP.NET membership API. This automatically logs out for inactive sessions. I don't want this auto log out. I used some work arounds like calling a page in ajax after a specified amount of time. Or I used the iframe method to keep the session active. But this does not fit my needs very well. I want to disable this logout function altogether.
Notice My question was in response to this article This
Increasing the Session Timeout Doesn't Always Work
At first glance, increasing the session timeout value in C# ASP .NET's web.config file should resolve the issue. You would assume that by changing the timeout value to 60 minutes in the line below, that a user would remain logged into a web application session for a full 60 minutes.
<authentication mode="Forms">
<forms name="MyAuth" timeout="60" protection="All" loginUrl="~/Web/Login.aspx" slidingExpiration="true" />
</authentication>
<sessionState mode="InProc" cookieless="false" timeout="60" />
However, there are actually two problems with this. The first problem is that setting the timeout value to anything greater than 1 hour will result in excessive memory being held on the server, as IIS holds all session memory for the duration of the session. Imagine a timeout value of 5 hours on a high traffic site, holding all session data for thousands of user sessions. The second problem may come upon testing the application, where often the web application will timeout after only 15 minutes. What exactly is happening? While the problem may actually be a value configured in IIS for the session timeout or connection timeout properties (which in the case of shared hosting, you may not even have access to), it becomes apparent we need to take control of the session timeout into our own hands.