This is a migrated thread and some comments may be shown as answers.

How to display Session Timeout based on Inactivity time set in WebConfig File.

1 Answer 169 Views
Notification
This is a migrated thread and some comments may be shown as answers.
gc_0620
Top achievements
Rank 1
gc_0620 asked on 23 Oct 2011, 11:44 PM

Folks, Environment VS 2010 with RadControls for ASP.NET AJAX Q2 2011 SP1. I am using below Telerik Demo for Session Time out.

http://demos.telerik.com/aspnet-ajax/notification/examples/sessiontimeout/defaultcs.aspx

This above approach is based on preset timeout value within the .aspx page. But I would prefer to show the Session timout inactivity alert based in value set in my Web Config file (here is 20 minutes).

My webconfig file...
<system.web>
.......
 <sessionState
 mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" 
 sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" 
  cookieless="false" timeout="20" />
.......
 </system.web>

If possible,  will very much appreciate if any sample code is provided for this solution. Thanks a lot. 

GC_0620

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 25 Oct 2011, 04:29 PM
Hello Gc_0620,

I believe the following article from MSDN will help you obtain the session timeout in the code-behind: http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.timeout.aspx. Please note that this is not related to the RadNotification, but is considered general ASP knowledge.


Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Notification
Asked by
gc_0620
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or