Are you using shared server? If yes, you cant use session on shared hosting as it will impact to other sites. You can use cookies or session state as an alternative.
i set the sessiontimeout 60 min in web.config,but it log out very earlier.
You can configure session state settings for the current application,
sessionState Element (ASP.NET Settings Schema)
Timeout: Specifies the number of minutes a session can be idle before it is abandoned.
The session timeout configuration setting applies only to ASP.NET pages. Changing the session timeout value does not affect the session time-out for ASP pages. Similarly, changing the session time-out for ASP pages does not affect the session time-out for
ASP.NET pages. The default is 20 minutes.
You can check the session state in IIS to confirm session timeout, at the same time you can also check the Check the
Windows Event Log to find the potential problem of this issue,
Regards
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
i set the sessiontimeout 60 min in web.config,but it log out very earlier.
Are you using Forms Authentication to log in? If so, you (and all the others that responded to your question) must realize that Forms Authentication has nothing to do with Session. The default timeout of forms authentication is 30 minutes, which means tha
a user will be logged out after 15 to 30 minutes after the last request, because the expiration time will only be reset after more than half of the timeout value had elapsed.
Member
62 Points
305 Posts
session timeout in webconfig
Jun 26, 2013 03:40 AM|creative-sh|LINK
i have uploaded my website in a server.
i set the sessiontimeout 60 min in web.config,but it log out very earlier.
so i guess the iis of the server set earlier.am i right?
can i change it by code?
Participant
1627 Points
457 Posts
Re: session timeout in webconfig
Jun 26, 2013 03:48 AM|Rohit Rao|LINK
Member
62 Points
305 Posts
Re: session timeout in webconfig
Jun 26, 2013 03:56 AM|creative-sh|LINK
just this?is other setting necessary?
Participant
1627 Points
457 Posts
Re: session timeout in webconfig
Jun 26, 2013 03:58 AM|Rohit Rao|LINK
yes, just try to use Session mode as "StateServer", i have seen many applications using it for better Session time out settings.
Participant
850 Points
297 Posts
Re: session timeout in webconfig
Jun 26, 2013 04:22 AM|ijaz_asp|LINK
Yes, you can control session state values and modes from IIS, here is a sample image from IIS 7.5, and It may vary for IIS versions.
ijaz
Participant
1930 Points
793 Posts
Re: session timeout in webconfig
Jun 26, 2013 04:28 AM|dotnetnerd|LINK
Hi creative,
Are you using shared server? If yes, you cant use session on shared hosting as it will impact to other sites. You can use cookies or session state as an alternative.
Windows ASP.NET Hosting | Reseller Hosting | Cloud Hosting
Member
62 Points
305 Posts
Re: session timeout in webconfig
Jun 26, 2013 04:35 AM|creative-sh|LINK
where is it?
Member
88 Points
197 Posts
Re: session timeout in webconfig
Jun 26, 2013 04:51 AM|sATsvelKe|LINK
this problem arises when you hosted the site to shared hosting, same thing happened to me ,
I have found solution for this , works perfectly now , you can check by visiting www.theiframe.com
and here is the link for the same
http://www.theiframe.com/Forum/Details.aspx?Post=2Yj8Q5cgCIM=
Participant
1930 Points
793 Posts
Re: session timeout in webconfig
Jun 26, 2013 11:46 PM|dotnetnerd|LINK
Hi creative,
If you use shared hosting, you cant access the IIS. But, you cant use session on shared server as I said above.
Windows ASP.NET Hosting | Reseller Hosting | Cloud Hosting
Contributor
3390 Points
1079 Posts
Re: session timeout in webconfig
Jun 27, 2013 02:31 AM|kctt|LINK
Session timeout can be set per website.
However you still need to configure idle time out for application pool to 60 minutes (default 20 mins)
Ask your provider to configure for you if you do not have admin access to server.
Member
62 Points
305 Posts
Re: session timeout in webconfig
Jun 29, 2013 03:28 AM|creative-sh|LINK
i went to application pool
but the name of my websit wasnt there
there were:
aspnet v4
aspnet v4 classic
classic .net apppool
default apppool
Member
443 Points
200 Posts
Re: session timeout in webconfig
Jun 29, 2013 03:31 AM|webcodeexpert|LINK
By default session time is 20 minutes.But you can increase or decrease it as per requirement. I suggest you to read the article:
How to increase session timeout period in asp.net
http://www.webcodeexpert.com/2013/02/how-to-increase-session-timeout-period.html
http://www.webcodeexpert.com
All-Star
32817 Points
3815 Posts
Re: session timeout in webconfig
Jul 02, 2013 04:29 AM|Angie xu - MSFT|LINK
Hi,
You can configure session state settings for the current application, sessionState Element (ASP.NET Settings Schema)
Timeout: Specifies the number of minutes a session can be idle before it is abandoned.
The session timeout configuration setting applies only to ASP.NET pages. Changing the session timeout value does not affect the session time-out for ASP pages. Similarly, changing the session time-out for ASP pages does not affect the session time-out for ASP.NET pages. The default is 20 minutes.
You can check the session state in IIS to confirm session timeout, at the same time you can also check the Check the Windows Event Log to find the potential problem of this issue,
Regards
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
443 Points
200 Posts
Re: session timeout in webconfig
Jul 02, 2013 01:22 PM|webcodeexpert|LINK
Read the article on session timeout and Your problem will get solved
How to increase session timeout period in asp.net
http://www.webcodeexpert.com/2013/02/how-to-increase-session-timeout-period.html
http://www.webcodeexpert.com
All-Star
25756 Points
7014 Posts
Re: session timeout in webconfig
Jul 02, 2013 07:26 PM|hans_v|LINK
Are you using Forms Authentication to log in? If so, you (and all the others that responded to your question) must realize that Forms Authentication has nothing to do with Session. The default timeout of forms authentication is 30 minutes, which means tha a user will be logged out after 15 to 30 minutes after the last request, because the expiration time will only be reset after more than half of the timeout value had elapsed.
http://msdn.microsoft.com/en-us/library/system.web.configuration.formsauthenticationconfiguration.timeout.aspx
http://msdn.microsoft.com/en-us/library/system.web.configuration.formsauthenticationconfiguration.slidingexpiration.aspx
So to increase the time, you need to set the timeout property in the Page Tag. Also, make sure to add a machinekey in your web.config:
http://aspnetresources.com/tools/machineKey