This question is locked. New answers and comments are not allowed.
Here's my dilemma. I have an MVC Telerik grid on a page that requires authorization to access. The grid uses Ajax databinding, and that is all working fine. The problem is that if the user is authorized, but sits on the page for any reason and their session expires, when they come back and try to use the form, nothing happens. The reason is because when the ajax request is made, it actually gets redirected to the login page (as all unauthorized requests should in this application), so the actual result is the HTML of the login page.
This, of course, throws an error which I can catch by subscribing to the OnError method. But then I have to actually parse the responseText of the XMLHttpRequest object and determine if the content is actually my login page, and if it is, redirect.
But something tells me this can't be the first time this has happened. Has anyone encountered this and if so, have you found a better workaround? Am I missing something? Thanks.
This, of course, throws an error which I can catch by subscribing to the OnError method. But then I have to actually parse the responseText of the XMLHttpRequest object and determine if the content is actually my login page, and if it is, redirect.
But something tells me this can't be the first time this has happened. Has anyone encountered this and if so, have you found a better workaround? Am I missing something? Thanks.