Monday, January 5, 2015

Increase Session Time Out in ASP .NET Application.

We Can Increase Session Time Out Using Following Two Methods.

1. Using Web.Config File.
2. Using IIS setting in the windows server(Application Server).

Using Web.Config File.

Using  web.Config file we need to add timeout="minutes" in  sessionstate of system.web section of web.config file.

<system.web>
        <sessionState timeout="540"/>
.....


 Using IIS setting in the windows server(Application Server).


Change the following time-outs in Internet Services Manager .Choose a value greater than the default of 20.
    1. Select Default Web Site > Properties > Home Directory > Application Settings > Configuration > Options.
    2. Enable the session state time-out and set the Session timeout for 60 minutes.

    3. Select Application Pools > DefaultAppPool > Properties.
    4. From the Performance tab under Idle timeout, set Shutdown worker processes after being idle for a value higher than 20.

The default session time-out setting on IIS is 20 minutes but it can be increased to a maximum of 24 hours or 1440 minutes. See Microsoft article Q233477 for details about increasing the timeout in IIS.
Symptom
When returning to the logon page for Web Interface, users often encounter an Error: Your session with the web-server expired. You have been logged out.
Cause
Web Interface 2.0 picks up the session timeout setting from IIS.
Resolution
1. Start Internet Services Manager 5.0.
2. For explicit authentication, right-click the /Citrix/MetaFrameXP/default virtual directory and view the Properties.
    For desktop credentials, pass-through users edit the /Citrix/MetaFrameXP/integrated virtual directory.
For Smart Card users, edit the /Citrix/MetaFrameXP/certificate virtual directory.
3. In the Application Settings section, click Configuration.
4. Select the App Options tab.
5. Ensure Enable session state is selected.
The default session time-out setting on IIS is 20 minutes but it can be increased to a maximum of 24 hours or 1440 minutes. See Microsoft article Q233477 for details about increasing the timeout in IIS.
NFuse Classic 1.71 and earlier
When Internet Explorer is configured never to check for newer versions of Web pages, NFuse Classic will not launch an application after a session is allowed to expire. To reproduce this problem:
    1. Configure your browser settings for 'Temporary Internet files and set Check for newer versions of stored pages to Never.
    2. Log on to Citrix NFuse Classic and view your published applications.
    3. Leave the system idle for 20 minutes or longer so that the Web server session expires.
    4. Click an application icon. The system returns you to the Logon page and a message appears stating that your session expired.
    5. Log on again and click the same application as before. You are again returned to the Logon page even though your session should not have expired this time.
Solutions
      • Clear the Temporary Internet Items folder
      • Upgrade to Web Interface 2.0 or later
      • Set Check for Newer versions of stored pages to Automatically
The default session time-out setting on IIS is 20 minutes but it can be increased to a maximum of 24 hours or 1440 minutes. See Microsoft article Q233477 for details about increasing the timeout in IIS.