Increasing the length of a Session in an ASP.NET application is a simple enough process. You can simply edit the sessionState node in web.config or machine.config.
<sessionState mode="InProc" stateConnectionString="tpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password="cookieless="false" timeout="20" />
One caveat to this, though, that I wasn't aware of until just recently. ASP.NET also includes automatic worker process recycling. This allows you to set thresholds for memory consumption, number of requests, deadlock detection, and so on. However, if you are using InProc session state, recycling the WP is also going to kill your session state.
<proessModel enable="true" timeout="Infinite" requestLimit="Infinite" requestQueueLimit="5000" restartQueueLimit="10" memoryLimit="60" />
If you're seeing the your session disappear even when it shouldn't be timing out, this is could be the culprit. There are various ways to handle this, depending on whether you're storing conversational state or just some variables that can be fetched again, but it's something to be aware of.
