I think that I have tried everything that makes sense. I have created a cookie ticket in my application and set the timeout to "120". I have "120" in the forms auth section of the web.config and the session timeout is set to 120. This is working fine on
my development machine but not on the production server. I know that the cookie is being set because the server date was accidently changed to one day earlier than date of the client and that caused the cookie to expire as soon as it was set. Another application
that did not use the host date as the cookie date, was not affected. I checked the recycle settings too and they are the default for IIS7, which is well over a few days. The odd thing though is that the forms cookie is expiring on the server at 30 minutes.
Not a fluctuating amount or at odd times so I don't think it's a virus scan or anything. Any help would be appreciated. IIS7, Windows 2003 server, ASP.Net 2.0 C#. Thanks
Follow are the steps to change the default session time in IIS.
1. Click on Start --> RUN --> type INETMGR and press enter.
2. Navigate to your application node, right click on it and then select "Properties".
3. In the 'Directory' tab click "Create" button, then click "OK".
4. Click on the "Home Directory" tab, then "Configuration".
5. Click on the "Options" tab.
6. Increase the "Session timeout" value and click "OK".
Pradeep Kr. Sharma
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
Is this in IIS Manager? If so, everywhere there is a session set, I changed it to 120. I don't see "Properties" when I right-click my site node in IIS7
As I said in my first post, I did all of the adjustments, including the application pool timeout. The application is working on my development machine but not the host machine. Thanks for your response anyway.
Though you have set timeout property in the web.config file you may also need to configure IIS7. As you have set the timeout in configure file more than the default time. You say it has expired after 30 minutes. The default timeout of Forms Authentication
is 30 minutes. You can try to set it in the IIS7 with the below steps.
1.Open the IIS manager.
2.Click the Authentication -> Forms Authentication
3.You can click “edit” to set the Authentication cookie timeout with 120 minutes.
I was sure but I tried the machine key anyway. Still no good. I've done everything suggested here and that I've found in other searches. Also, my localhost, running IIS7 is allowing the full 120 minutes. Can the host server control it where my settings would
not matter?
EMateer
Member
10 Points
8 Posts
Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 14, 2012 05:36 PM|LINK
I think that I have tried everything that makes sense. I have created a cookie ticket in my application and set the timeout to "120". I have "120" in the forms auth section of the web.config and the session timeout is set to 120. This is working fine on my development machine but not on the production server. I know that the cookie is being set because the server date was accidently changed to one day earlier than date of the client and that caused the cookie to expire as soon as it was set. Another application that did not use the host date as the cookie date, was not affected. I checked the recycle settings too and they are the default for IIS7, which is well over a few days. The odd thing though is that the forms cookie is expiring on the server at 30 minutes. Not a fluctuating amount or at odd times so I don't think it's a virus scan or anything. Any help would be appreciated. IIS7, Windows 2003 server, ASP.Net 2.0 C#. Thanks
Pradeep Kr. ...
Participant
1712 Points
294 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 14, 2012 05:49 PM|LINK
check the session timeout inside the IIS setting
Follow are the steps to change the default session time in IIS.
1. Click on Start --> RUN --> type INETMGR and press enter.
2. Navigate to your application node, right click on it and then select "Properties".
3. In the 'Directory' tab click "Create" button, then click "OK".
4. Click on the "Home Directory" tab, then "Configuration".
5. Click on the "Options" tab.
6. Increase the "Session timeout" value and click "OK".
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
EMateer
Member
10 Points
8 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 14, 2012 06:43 PM|LINK
Is this in IIS Manager? If so, everywhere there is a session set, I changed it to 120. I don't see "Properties" when I right-click my site node in IIS7
Pradeep Kr. ...
Participant
1712 Points
294 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 14, 2012 08:21 PM|LINK
Read this article, shows how to configure timeout on IIS7.
http://beyondrelational.com/blogs/sandeepprajapati/archive/2011/12/21/session-timeout-in-iis-7-worker-process-of-applicationpool.aspx
http://vshelpdesk.blogspot.com/
Please Mark As Answer, which helped you. So that it might be useful for others.
EMateer
Member
10 Points
8 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 14, 2012 09:41 PM|LINK
As I said in my first post, I did all of the adjustments, including the application pool timeout. The application is working on my development machine but not the host machine. Thanks for your response anyway.
Qi Wu - MSFT
Contributor
5794 Points
677 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 16, 2012 07:35 AM|LINK
Hi,
Though you have set timeout property in the web.config file you may also need to configure IIS7. As you have set the timeout in configure file more than the default time. You say it has expired after 30 minutes. The default timeout of Forms Authentication is 30 minutes. You can try to set it in the IIS7 with the below steps.
1.Open the IIS manager.
2.Click the Authentication -> Forms Authentication
3.You can click “edit” to set the Authentication cookie timeout with 120 minutes.
Hope it can help you.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
hans_v
All-Star
35998 Points
6551 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 16, 2012 09:23 AM|LINK
Are you sure about that? Because if it is fluctuating, the most likely reason is that you didn't add a machinekey in your web.config
http://aspnetresources.com/tools/machineKey
EMateer
Member
10 Points
8 Posts
Re: Forms Auth Cookie timeout works on development but uses 30 min default in production
Jan 17, 2012 01:03 PM|LINK
I was sure but I tried the machine key anyway. Still no good. I've done everything suggested here and that I've found in other searches. Also, my localhost, running IIS7 is allowing the full 120 minutes. Can the host server control it where my settings would not matter?