I’m writing a role based application in ASP.NET MVC 3. Obviously, depending on the role the user is in, will depend what pages or functions they have access to. I’m not really certain the best place, or way to implement this in an MVC application. Any information or points to certain resources would be appreciated.
Thanks in advance.
If you want to implement your own membership system, then you can follow these steps:
AuthenticateRequesteventFormsAuthenticationclass to create, encrypt and decrypt cookies for you.HttpContext.Current.Itemsas a key/value pair. This way, you can use it anywhere you want.Authentication Cookieand send it to the client.