jquery - ajax and security controller -


i'm using jquery ajax post , when success data , replace items works if add security controller that

[authorize] public actionresult ......... 

if user logged in go ok when user not logged or not authorized should redirected login page

as i'm using ajax , not ordinary post user not redirect log in window? can solve problem? or how can know user isn't authorized before post java display alert tell user log in or role didn't match?

i think these 2 questions can provide enough info set in right direction.

  1. asp mvc [authorize] return post instead of get
  2. more control on asp.net mvc's authorize; keep ajax requests ajaxy

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -