Current filter:
                                You should refresh the page.
                                  • In the aspx web site we develop, we wanted to give the users chance to continue their session 1 minute before the session times out. I figured that you guys have a solution for that. I applied the solution, but I don't get consistent results. In the web.config, we set the time out values in the following way.

                                    <authentication mode="Forms"> <!-- Forms Time Out value should be equal to SessionState TimeOut value--> <forms slidingExpiration="true" loginUrl="~/Login.aspx" timeout="30"/> </authentication>

                                    <sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="30">

                                    If I set the time out values to let's say 2 minutes, then everything works fine, but 30 minutes gives inconsistent results. For example, I leave the web site alone, and minimize the browser. After more than 30 minutes, when I maximize the browser, I see the time out pop up hanging. Time out count down gets set to 0, but it can't do the required redirection to the configured page. I also see a spinning circle on the browser tab. The browser tries to redirect, but it feels that the pop up prevents it.

                                    Some other scenario is that I catch the timeout countdown before it times out, I click OK to continue session, but it redirects me to the login page as if the session timed out before the countdown.

                                    Do you guys know what might be causing this?

                                • Kate Dehbashi (DevExpress) 06.07.2013

                                  Hi Yilmaz,
                                  We need some additional time to process this ticket. We will update this thread once we have results to report.
                                  In the meantime, I recommend that you refer to the following example for a possible solution:
                                  How to control state when the Session is being expired and prolong it on demand
                                  Attached, please find the example code.

                                • Yilmaz Uksal 06.10.2013

                                  I already use the same code you attached. The only difference is the following in web.config
                                  Mine:
                                  <authentication mode="Forms">
                                        <!-- Forms Time Out value should be equal to SessionState TimeOut value-->
                                        <forms slidingExpiration="false" loginUrl="~/Login.aspx" timeout="30"/>
                                      </authentication>
                                  Yours:
                                  <authentication mode="Windows" />
                                  For session timeout set to 2 or 3 minutes, this code works, but when it's set to 30 minutes then problems arise.

                                • Yilmaz Uksal 06.11.2013

                                  On IE 9, when session time out value is set to 30 minutes, the attached network traffic occurs. The strange thing is that the second request never ends. This leaves browser in busy state. Also I don't know what it is, but the first request bar is not filled with yellow color up to a certain point. These requests take little time when session time out value is set to less than 10 minutes and the browser doesn't hang stuck with the timeout pop up showing 0 second.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Yilmaz,
                                I suggest setting the Forms Authentication Timeout value twice as big as the Session Timeout value:
                                TimeOut(Session) <= TimeOut(FormsAuthentication) * 2
                                For example, if Session.Timeout is 10, set FormsAuthentication.Timeout to 21 minutes.
                                The reason for this lies in the standard asp.net authentication behavior described here:
                                http://msdn.microsoft.com/en-us/library/1d3t3c61(v=vs.71).aspx
                                "the cookie is updated when more than half the specified time has elapsed."
                                See also the following blog posts:
                                http://stackoverflow.com/questions/1470777/forms-authentication-timeout-vs-session-timeout
                                http://completedevelopment.blogspot.ru/2009/12/caution-with-using-sessiontimeout-and.html
                                Feel free to contact us if this information does not help you.

                                Updated:
                                I cannot reproduce the problem with your sample. It seems, however, that the problem occurs because IE does not support setting the document.location property.
                                Use window.location instead.
                                Please try this code and inform us about your result - we will fix the Code Sample accordingly:

                                ...  
                                	function loadAnother(){  
                                		window.location = 'http://www.devexpress.com/Support/Center/Question/Details/Q500706';  
                                	}

                                Thanks,
                                Vic.

                                Show all comments
                                • Yilmaz Uksal 06.12.2013

                                  The bug persisted. I set session timeout to 30 minutes and forms timeout to 61 minutes. I launched the site, logged in and minimized the window. After more than 30 minutes, I checked the browser and the count down was hanging having 0 second. I think the problem is different.

                                • Yilmaz Uksal 06.12.2013

                                  Attached is a snap shot of what I see on the screen. It gets stuck like this.

                                • Yilmaz Uksal 06.12.2013

                                  On IE developer tools, I checked the network tab to see the request and response. Response is sent successfully and the response body has the complete html for the requested page, but somehow the browser can't load the page.

                                • Kate Dehbashi (DevExpress) 06.12.2013

                                  Hi Yilmaz,
                                  Would you please send us a sample project and a video that shows how to reproduce the issue? You can use the Jing tool for this purpose.

                                • Yilmaz Uksal 06.13.2013

                                  Actually I figured out the problem. document.location doesn't work properly when the browser is not in focus. I was able to reproduce the same issue without your controls. Since your time out control also relies on document.location, I think it should be specified on control specification.
                                  Attached is my sample html page. All it does is to wait 10 minutes and navigate to this question.
                                  Please open the html page and minimize the browser. Wait more than 10 minutes and then maximize the browser. Then you should see the described behavior.

                                • Vic S (DevExpress) 06.14.2013

                                  Hello Yilmaz,
                                  Thank you for additional details.
                                  I cannot reproduce the problem with your sample. It seems, however, that the problem occurs because IE does not support setting the document.location property.
                                  Use window.location instead.
                                  Please try this code and inform us about your result - we will fix the Code Sample accordingly:

                                  ...  
                                  	function loadAnother(){  
                                  		window.location = 'http://www.devexpress.com/Support/Center/Question/Details/Q500706';  
                                  	}

                                  Thanks,
                                  Vic.

                                • Yilmaz Uksal 06.14.2013

                                  Thanks. It worked.

                                • Vladimir Frizen (DevExpress) 06.16.2013

                                  Hello Yilmaz ,
                                  I am glad to hear that our assistance was helpful.
                                  Once your question has been resolved to your satisfaction, mark a corresponding Answer as a Solution. Your question status will immediately become Closed.
                                  SC2 FAQ