المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to authorize user by form authentication in mvc 4



C# Programming
07-23-2013, 10:32 PM
I am setting formauthentication.setauthcoddkie and on the action i have written [authorise] attribute
now if i type the page url directly it redirects me to login page which is correct

but when i login then it still show the login page

how to make sure that once i have logged in it shows the page. i am using my own custom database and tables

i tried if (HttpContext.User.Identity.IsAuthenticated) also but it is not going to the controller at all
it just kicks out even if i login

any help is appreciated