Session Timeout issue for Web application hosted on IIS


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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
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.

ArikkanAuthor 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

2. Add this to Web Config

    <httpRuntime executionTimeout="1800" />

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

Do you have any other suggestions?
ArikkanAuthor Commented:
ok the setting for the Application Pool worked finally.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ArikkanAuthor Commented:
My proposed solution worked.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.