in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

This Blog

Syndication

The ASPx Blog - Mehul Harry's DevExpress Blog

How To Redirect To Login Page After Session Timeout

Check out this 6 1/2 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:

image

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 Mehul Harry (Developer Express)

Comments

 

Raul said:

hmmm that really seems to be interesting!

August 26, 2008 7:01 AM
 

risha said:

very good content

November 11, 2008 4:19 AM
 

Kevin Dan said:

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

Thx

April 15, 2009 3:46 PM
 

Mehul Harry (Developer Express) said:

Hi Kevin,

Yes, it's part of our DXperience suite:

www.devexpress.com/.../NET

April 15, 2009 3:55 PM
 

Kevin Dan said:

Thx, found the answer after watching your video.

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

if(!HttpContext.Current.User.Identiy.IsAuthenticated)

FormsAuthentication.RediectToLoginPage();

appreciated for your quick response,

Kevin

April 15, 2009 4:07 PM
 

Mehul Harry (Developer Express) said:

Hi Kevin,

Yes. Smile

April 15, 2009 4:56 PM
 

Kevin Dan said:

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

thx

April 15, 2009 5:42 PM
 

Mehul Harry (Developer Express) said:

Hi Kevin,

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

April 15, 2009 6:32 PM

Leave a Comment

(required)  
(optional)
(required)  
Verification code: Required
   
Add

About Mehul Harry (Developer Express)

Mehul Harry is an ASP.NET technical evangelist at Developer Express. You can reach him directly at mharry@DevExpress.com. You can also follow him on Twitter: http://twitter.com/mehulharry
Copyright © 1998-2009 Developer Express Inc.
ALL RIGHTS RESERVED