How can I integrate mvc sitemap in ASP.NET MVC application to provide Role based Access control, and is it the best why or there is a better way to have role based access ?
Best way to implement role based security in asp.net mvc is to use ASP.Net membership provider where u can easily use [Authorize]
attribute.
You can authorize a single actionresult as :
[Authorize] <--Attribute for role based security
public ActionResult YourAction()
{.....}
You can authorize a complete Controller as :
[Authorize]
public class YourController : Controller
{.....}
To restrict access for specific roles, use:
[Authorize(Roles = "Admin,Client")]
public ActionResult YourAction()