I am using ASP.Net MVC beta 1 and I am using the asp.net membership provider with a standard authentication controller to restrict access to my site.
I use the ajax function to provide, for example, editing values by loading partial views into a div using jQuery $ .get / $. ajax or using the Ajax.Actionlink MVC helper. All this works great most of the time.
My problem occurs after the login time has expired, and you click on one of the ajax editing links - the ajax call returns the login page, which is placed in the div, usually used for the editing form.
I want to find a way to redirect the whole page to the login form when the authentication timeout and click on the ajax link.
One way that I can think of is to look at the html returned from the ajax call in the return response and look for the text field or the login input field and do the redirection from there - but this is not very clean - is there a better way?
Whisk source
share