0

my requirement is that can we code in such a way that there will be no timeout unless n until we logout....

in my project client needs that they will have ideal time but after that much time too they should not redirect to login page, they want it as unlimited session or 8 to 9 hours.

If user has logged in and opened any page in my website and does nothing for 20 mins. Now if he selects any thing from menu or clicks any button he is redirected to login page.

I can't change the time-out settings for the IIS application pool.

I tried following ways 1. i have wrote in config file as

<sessionState cookieless="false" regenerateExpiredSessionId="true" timeout="129600" />

3. i also tried in Global.asax file protected void Session_Start(object sender, EventArgs e) { Session.Timeout = 480; }

None of the above worked for me.

2 Answers 2

0

Set your session time out in IIS

Increase session time out

5
  • I don't have permission to change the time-out settings for the IIS application pool.Please tell mi server side solution if possible.
    – Nalini
    Jul 17, 2014 at 8:55
  • The session will be lost when the ApplicationPool recycles. To set the timeout in the web.config or code will not be enough. You need to adjust the setting in IIS.
    – user2655145
    Jul 17, 2014 at 23:07
  • Thanks, But I don't have permission to adjust the setting in IIS. Whats the other way to increase the timeout?
    – Nalini
    Jul 22, 2014 at 5:44
  • 1
    Try Session.Timeout = 1000; Are using FormsAuthentication? A forms authentication timeout will send the user to the login page with the session still active.
    – user2655145
    Jul 23, 2014 at 5:16
  • Yes, I am using FormsAuthentication.
    – Nalini
    Jul 25, 2014 at 6:18
0

I had the problem same like yours. I did some research and final I got this.I tried to set the session time out to set in 3 hours. I used web.config and IIS session management section.If you change session time out in web.config it automatically appear in IIS session management but the problem is idle timeout is on or off no matter after the idle timeout time session is destroyed.So I changed the idle timeout to same as my session validate period until now there is no problem. I think you need to change it in IIS otherwise it will not work.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.