ASP.NET Team Blog

This Blog


Mehul Harry is the DevExpress Web Program Manager. Follow him on twitter: @Mehulharry

Subscribe (RSS, Email)


How To Redirect To Login Page After Session Timeout

Check out this 7 minute video which shows how to redirect users to a login page when the browser session times out. Click the image to see how to build a small application which uses a Login control, Forms Authentication, and the ASPxHttpHandler module:


Using Forms Authentication in an ASP.NET application makes it difficult to redirect users during callbacks. Since Ajax Callbacks only update partial portions of the page. This makes redirecting kind of a pain.

Imagine you have a page that uses a Grid View with callbacks. If a user’s session times out and the user tries to group, sort, page or any operation that does a callback. Then the browser will idle and display the loading icon spinning as the server tries to redirect to the login page.

There is an easy way to handle this. Just add an ASPxHttpHandler module to your web application and it will redirect a callback when the session has timed out.

Check out the video and then leave me note below about how you plan to use this feature.

Published Aug 25 2008, 06:30 PM by
Bookmark and Share



hmmm that really seems to be interesting!

August 26, 2008 7:01 AM


very good content

November 11, 2008 4:19 AM

Kevin Dan

How and where to get the ASPxHTTPHanlder Module? Is it in installation package?


April 15, 2009 3:46 PM

Mehul Harry (DevExpress)

Hi Kevin,

Yes, it's part of our DXperience suite:

April 15, 2009 3:55 PM

Kevin Dan

Thx, found the answer after watching your video.

Do I have to do this for every page which involves callback?



appreciated for your quick response,


April 15, 2009 4:07 PM

Mehul Harry (DevExpress)

Hi Kevin,

Yes. Smile

April 15, 2009 4:56 PM

Kevin Dan

Thx, Mehul.

Since we are on the same page :-), may I ask you on more question:

is there JavaScript Intelligence support for DevExpress controls in VS2008? e.g. type in "ASPxCheckBox." in aspx or js file prompts the list of client side properties and functions


April 15, 2009 5:42 PM

Mehul Harry (DevExpress)

Hi Kevin,

Not yet but we're looking into it. Keep an eye on this blog for updates.

April 15, 2009 6:32 PM

Sagest Ekonomi

i have a problem with this. if i specify

  <forms name="authForm"









            enableCrossAppRedirects="false" >      



<sessionState mode="InProc" timeout="2"></sessionState> in the web.config,

when the session end after 2 mins fires the Session_end in Global.asax

that destroys the session, and when i go to login.aspx after the authenticate the: FormsAuthentication.RedirectFromLoginPage(this.Login1.UserName, false);

send me to the last request, giving me problems because my session values are null. I tried to make a Response.Redirect instead but that gives me the login.aspx again? how can i work around this?! Thanks in Advance

November 1, 2010 1:45 PM

Mehul Harry (DevExpress)


I recommend contacting our support team as they can help you resolve this:

November 1, 2010 10:19 PM

Vijay Macha

Hi Mehul,

Can't find the youtube video

April 3, 2015 2:52 AM

Mehul Harry (DevExpress)


If you click on the link above, it will take you to a page where you can download the video.

April 3, 2015 11:22 AM

About Mehul Harry (DevExpress)

Mehul Harry is an ASP.NET technical evangelist at Developer Express. You can reach him directly at You can also follow him on Twitter:

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners