How do you handle ajax requests when user is not authenticated?

Posted by LukLed on Stack Overflow See other posts from Stack Overflow or by LukLed
Published on 2010-04-05T19:26:15Z Indexed on 2010/04/05 19:33 UTC
Read the original article Hit count: 212

Filed under:
|
|
|
|

How do you handle ajax requests when user is not authenticated?

Someone enters the page, leaves room for an hour, returns, adds comment on the page that goes throuh ajax using jQuery ($.post). Since he is not authenticated, method return RedirectToRoute result (redirects to login page). What do you do with it? How do you handle it on client side and how do you handle it in controller?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about ASP.NET