We help IT Professionals succeed at work.

Session Timeout issue for Web application hosted on IIS

660 Views
Last Modified: 2015-08-09
Hi,

I am working on a Web application which has session Timeout set in the file Global.asax as below:

Private Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
    Session.Timeout = 30
End Sub


When I change the timeout and test on my local machine, it works perfectly to the minute (Lower or higher value).

Now we deploy on server (IIS / Windows Server 2008 R2 Standard) and the timeout does not work. It gets capped at 20 min. I can reduce the timeout, but cannot increase it more than 20 min. Something else is interfering with the timeout. I am not sure what it might be on the server.

Any ideas what can be causing that?
Comment
Watch Question

Dan McFaddenTechnical Lead - Active Directory
CERTIFIED EXPERT

Commented:
You're getting overridden by defaults settings in the ASP.NET Session State configuration of your website.

1. On the server, go into IIS Manager
2. Select the website with the issue
3. In the Feature area, under ASP.NET, double click Session State
4. In the Coolie Settings, update the Time-out (in minutes) setting to reflect your desired timeout.

You may need to stop/start the site for the configuration to get picked up.

Dan

Author

Commented:
I changed it, but this did not work.

I am trying to change other settings in IIS to see if they work:


1. Configure Idle Time-out Settings for an Application Pool
https://technet.microsoft.com/en-us/library/Cc771956(v=WS.10).aspx


2. Add this to Web Config
http://stackoverflow.com/questions/2414441/how-to-increase-request-timeout-in-iis7-0

<system.web>
    <httpRuntime executionTimeout="1800" />
</system.web>


3. Add this to Web Config
<system.web>
    <sessionState timeout="40" />
</system.web>


Do you have any other suggestions?
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
My proposed solution worked.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.