单选题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 namedAdministrators. Which code segment should you use?()A bool i

题目
单选题
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 namedAdministrators. Which code segment should you use?()
A

bool isMember = Roles.GetUsersInRole(Administrators).Any()

B

bool isMember = Membership.ValidateUser(User.Identity.Name, Administrators)

C

bool isMember = Roles.GetRolesForUser(Administrators).Any()

D

bool isMember = User.IsInRole(Administrators)


相似考题
更多“You are creating an ASP.NET Web site. The site is configured”相关问题
  • 第1题:

    You create a Web site. The Web site has many predefined roles and associated users that will be used for security purposes. You need to manage these roles and user accounts. Which tool should you use? ()

    • A、the Microsoft .NET Framework Configuration tool
    • B、the Code Access Security Policy tool
    • C、the ASP.NET IIS Registration tool
    • D、the Web Site Administration Tool

    正确答案:D

  • 第2题:

    You are an IIS Web server administrator implementing authentication settings for a new Web site.According to the requirements for the Human Resources Web site, users should be prompted forauthentication information when they attempt to access the site. The site will be accessed only by userswho have accounts in your organization’s Active Directory domain. You have already configured the filesystem permissions for the content based on the appropriate settings. You also want to maximize securityof the site. Which two actions should you take to meet these requirements?()

    • A、Enable Windows authentication.
    • B、Enable basic authentication.
    • C、Disable anonymous authentication.
    • D、Enable anonymous authentication.

    正确答案:A,C

  • 第3题:

    You create a Web site. You add an EditorZone control to the home page on the Web site. You need to enable users to customize the size and location of the Web Parts on their home pages. Which two controls should you add to the EditorZone control?()

    • A、BehaviorEditorPart
    • B、AppearanceEditorPart
    • C、PropertyGridEditorPart
    • D、LayoutEditorPart

    正确答案:B,D

  • 第4题:

    You create a Web site for a customer. You need to deploy the Web site to the customers server without any of the source files for the Web site. You do not want the customer to be able to update any of the static pages on the Web site. Which tool should you use?()

    • A、aspnet_compiler.exe
    • B、InstallUtil.exe
    • C、CSC.exe
    • D、aspnet_wp.exe

    正确答案:A

  • 第5题:

    单选题
    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 namedAdministrators. Which code segment should you use?()
    A

    bool isMember = Roles.GetUsersInRole(Administrators).Any()

    B

    bool isMember = Membership.ValidateUser(User.Identity.Name, Administrators)

    C

    bool isMember = Roles.GetRolesForUser(Administrators).Any()

    D

    bool isMember = User.IsInRole(Administrators)


    正确答案: D
    解析: 暂无解析

  • 第6题:

    单选题
    You work as the IT professional in an international company which is named Wiikigo. You are experiencedin implementing and administering a network operating system. You are specialized in deploying servers,configuring Windows Server 2008 Terminal services and network application services, and configuring aweb services infrastructure. A Web site is hosted by your company, and the web site is on a server thatruns Windows Server 2008. The Web Server (IIS) server role is installed on the server. The company configures SSL on the Web site for virtual directories which encryption is needed. A new Web application is implemented on the Web site. Its own logon page named userlogin.aspx is contained by the new application. Forms Authentication is enabled in the Web site properties. Since you are the technical support, you are required to configure the Web site so as to authenticate user accounts by utilizing userlogin.aspx. Which action should be performed to achieve the goal?()
    A

    To achieve the goal, the Login URL property for the Forms Authentication Settings should be configured  to the userlogin.aspx filename.

    B

    To achieve the goal, the Default Document setting should be configured to add the userlogin.aspx filename in the Web site properties.

    C

    To achieve the goal, the Forms Authentication Settings should be configured to Require SSL.

    D

    To achieve the goal, the Name property of the Cookie Settings should be configured to the userlogin.aspx filename.


    正确答案: A
    解析: 暂无解析

  • 第7题:

    单选题
    You install the Web Server (IIS) role on a new server that runs Windows Server 2008.  You install a Microsoft .NET Framework 1.0 application on a Web site on the Web server. The company security policy states that all applications must run by using the minimum level of permission.  You need to configure the Web site application so that it has the permissions to execute without creating any other content and without accessing any operating system components. What should you do?()
    A

    Set the .NET Framework trust level to Full for the Web site.

    B

    Set the .NET Framework trust level to Low for the Web site.

    C

    Set the .NET Framework trust level to High for the Web site.

    D

    Set the .NET Framework trust level to Medium for the Web site.


    正确答案: C
    解析: 暂无解析

  • 第8题:

    单选题
    You are a systems administrator responsible for managing a Windows Server 2008 Web server. Recently,your organization set up a new IIS Web site that will be accessed by users outside of your organizations.Consultants should be able to connect to this Web site, using IIS Manager. Your organization’s securitypolicy prevents you from creating domain accounts or local user accounts for these users. You attempt touse the IIS Manager Permissions feature for the Web site. However, when you click Allow User, you areable to select only Windows users.  How can you resolve this problem?()
    A

    Verify that Management Service has been started.

    B

    Reconfigure the file system permissions for the root folder of the Web site.

    C

    Reconfigure Management Service to enable Windows And IIS Manager Credentials.

    D

    Verify the Authentication settings for the Web site.


    正确答案: A
    解析: 暂无解析

  • 第9题:

    单选题
    You work as the IT professional in an international company which is named Wiikigo. You are experiencedin implementing and administering a network operating system. You are specialized in deploying servers,configuring Windows Server 2008 Terminal services and network application services, and configuring aweb services infrastructure. You are in charge of a server that runs Windows Server 2008. The server hasthe Web Server (IIS) server role installed. The Web developer at your company creates a new Web sitethat runs an ASP.NET 3.0 Web application. The ASP.NET Web application must run under a securitycontext that is separate from any other ASP.NET application on the Web server. You create a local useraccount and grant account rights and permissions to run the ASP.NET Web application. Authentication forthe new Web site should be configured to support the Web application. What action should you perform?()
    A

    The ASP.NET Impersonation setting should be configured to Enabled. Edit the ASP.NET Impersonation setting by specifying the new local user account.

    B

    The Windows Authentication setting should be configured to Enabled.

    C

    The Forms Authentication setting should be configured to Enabled by using all the default settings.

    D

    The ASP.NET State Service should be configured to log on to the new local user account by using the Services console.


    正确答案: B
    解析: 暂无解析

  • 第10题:

    You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience. The custom user control uses two TextBox controls and two Button controls. You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site. Which two actions should you perform? ()

    • A、Add the OnClick event handler for the Login button to the code used in the custom user control.
    • B、Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.
    • C、In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.
    • D、In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.

    正确答案:A,D

  • 第11题:

    You create a Web site for a customer. You need to deploy the Web site to the customers server without any of the source files for the Web site. You do not want the customer to be able to update any of the static pages on the Web site. Which tool should you use? ()

    • A、aspnet_compiler.exe
    • B、InstallUtil.exe
    • C、CSC.exe
    • D、aspnet_wp.exe

    正确答案:A

  • 第12题:

    You are creating an ASP.NET Web site. The site contains pages that are available to anonymous users. The site also contains a page named Premium.aspx that provides premium content to only members of a group named Subscribers. You need to modify the web.config file to ensure that Premium.aspx can be accessed by only members of the Subscribers group. Which configuration should you use?()

    • A、<location path="Premium.aspx"> <system.web> <authorization> <allow users="Subscribers"/>            <deny users="*"/> </authorization> </system.web> </location> 
    • B、<location path="Premium.aspx"> <system.web> <authorization> <allow roles="Subscribers"/>             <deny users="*"/> </authorization> </system.web> </location> 
    • C、<location path="Premium.aspx"> <system.web> <authorization> <allow roles="Subscribers"/>             <deny users="?"/> </authorization> </system.web> </location> 
    • D、<location path="Premium.aspx"> <system.web> <authorization> <deny users="*"/> <allow roles="Subscribers"/> </authorization> </system.web> </location>

    正确答案:B

  • 第13题:

    单选题
    You create a Web site for a customer. You need to deploy the Web site to the customers server without any of the source files for the Web site. You do not want the customer to be able to update any of the static pages on the Web site. Which tool should you use?()
    A

    aspnet_compiler.exe

    B

    InstallUtil.exe

    C

    CSC.exe

    D

    aspnet_wp.exe


    正确答案: B
    解析: 暂无解析

  • 第14题:

    单选题
    You have a Windows Server 2008 server that has the Web Server (IIS) server role installed. The servercontains a Web site. You need to ensure that the cookies sent from the Web site are encrypted on userscomputers. Which Web site feature should you configure?()
    A

    Authorization Rules

    B

    Machine Key

    C

    Pages And Controls

    D

    SSL Settings


    正确答案: B
    解析: 暂无解析

  • 第15题:

    单选题
    You create a Web site. The Web site has many predefined roles and associated users that will be used for security purposes. You need to manage these roles and user accounts. Which tool should you use? ()
    A

    the Microsoft .NET Framework Configuration tool

    B

    the Code Access Security Policy tool

    C

    the ASP.NET IIS Registration tool

    D

    the Web Site Administration Tool


    正确答案: B
    解析: 暂无解析

  • 第16题:

    单选题
    You have a server that runs Windows Server 2008. The server has the Web Server (IIS) server role installed.   The server contains a Web site that is configured to use only Windows Authentication. You have a security group named Group1 that contains several user accounts.  You need to prevent the members of Group1 from accessing a Web site. You must not prevent other users from accessing the Web site.  Which Web site feature should you configure?()
    A

    Authentication

    B

    Authorization Rules

    C

    IIS Manager Permissions

    D

    SSL Settings


    正确答案: B
    解析: 暂无解析

  • 第17题:

    单选题
    You create a Web site for a customer. You need to deploy the Web site to the customers server without any of the source files for the Web site. You do not want the customer to be able to update any of the static pages on the Web site. Which tool should you use? ()
    A

    aspnet_compiler.exe

    B

    InstallUtil.exe

    C

    CSC.exe

    D

    aspnet_wp.exe


    正确答案: B
    解析: 暂无解析