0

I have a asp.net website hosted on the server. On localhost session timeout is working but on server it is not working (Around only 5 min).

I am using following code.

  <sessionState
  mode="InProc"
  timeout="100"  />

Please help me.

2 Answers 2

1

In some cases, when you increase session timeout, then run web application, session will still expire. There could be few possible reasons for this.

Notice that session timeout should be less than Application pool idle timeout, so if you increase session timeout, you have to increase application idle timeout too. Otherwise, application will get recycled. If application is recycled, sessions will expire automatically.

Also, if you use Forms Authentication, you'll probably need to increase forms timeout too, using markup code in web.config like this:

    <system.web>
      <authentication mode="Forms">
        <forms timeout="60"/>
      </authentication>

    ...
    </system.web>

getting more info..see this link http://www.beansoftware.com/ASP.NET-Tutorials/Session-Timeout-Expiration.aspx

And for keep alive your session timeout..find this example for that.. http://www.beansoftware.com/ASP.NET-Tutorials/Keep-Session-Alive.aspx

Sign up to request clarification or add additional context in comments.

Comments

1

Set your session timeout minutes in IIS settings of your website on your server.

For IIS steps follow this https://technet.microsoft.com/en-us/library/cc725820(v=ws.10).aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.