When the site logs you out frequently it usually means that IIS is set to recycle your application pool too often. You can configure the IIS recycling from the IIS Manager. In IIS Manager, expand the local computer, expand Application Pools, right-click the application pool, and click Properties. Use the Recycling tab to perform the configuration.
As an alternative you can configure AspNetDating to keep the sessions in a StateServer. This way the site will not log you out even if it is recycled. Here are the steps to configure the ASP.NET state service:
- On the remote server that will store session state information, open Administrative Tools, and then click Services.
- In the details pane, right-click ASP.NET State Service, and then click Properties.
- On the General tab, in the Startup type list box, click Automatic.
- Under Service status, click Start, and then click OK. The state service starts automatically when the Web server is restarted.
- Open your web.config file and configure the sessionState tag to use StateServer. It should look like this:
<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false"timeout="20"/>