문제

i am new to MVC4. i am using ASP.net forms authentication. in all page loads i am able to handle authentication and authorization.

i am using Ajax requests in case of Partial views and to return a object.

in case of partial views i am able to find manage by checking Ajaxrequest by following this

in case of object return how to handle authentication for all ajax requests?

My end goal is to intimate that your session time out or at least to redirect to login page

도움이 되었습니까?

해결책

다른 팁

Decorate your action methods with [Authorize] attribute.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top