Web Developer Framework 4.0 Sample Questions – 8
Question: You are creating an ASP.NET Web site. The site is configured to use Membership and Role management providers. You need to check whether the currently logged-on user is a member of a role named Administrators. Which code segment should you use? bool isMember = Roles.GetUsersInRole(“Administrators”).Any(); bool isMember = Membership.ValidateUser(User.Identity.Name, “Administrators”);… Continue reading