nerdexam
GIAC

GSSP-NET · Question #220

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Web application using .NET Framework 2.0. The…

The correct answer is A. Pass the role names to the User.IsInRole method. See the full explanation below for the reasoning.

Question

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Web application using .NET Framework 2.0. The application is for members only. The behavior of the Web application varies according to the role of the user. The Web application uses the ASP.NET Membership control for creation of user accounts. You are required to find out whether a user is a member of a specific role. What will you do?

Options

  • APass the role names to the User.IsInRole method.
  • BPass the user names and passwords to the Membership.ValidateUser method.
  • CPass the role names to the Roles.RoleExists method.
  • DPass the user names to the User.IsUserInRole method.

How the community answered

(23 responses)
  • A
    78% (18)
  • B
    13% (3)
  • C
    4% (1)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice