How to implement Authentication and Authorization in MVC?
I have used it as-
public ActionResult Default()
if (Session["UserId"] == null)
return RedirectToAction("Login", "Login");
After successfully logging, redirects on Home controller and action - Default.
Here i am check session userid value if it is null then go to Login controller and invoke login method.
I know that in mvc there is a attribute named as Authenticate but i am not aware how to use it.
Plz give me solution and code.