单选题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?()Abool isMember = Roles.GetUsersInRole(Administrators).Any()Bbool isMember = Membership.ValidateUser(User.Identity.Name, Administrators)Cbool isMember = Roles.GetRolesForUser(Administrators).Any()Dbool isMember = User.IsInRole(Administrators)

单选题
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 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. BehaviorEditorPartB. AppearanceEditorPartC. PropertyGridEditorPartD. LayoutEditorPart

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.exeB. InstallUtil.exeC. CSC.exeD. aspnet_wp.exe

Your company has an Active Directory domain. All computers are members of the domain. Your networkcontains an internal Web site that uses Integrated Windows Authentication. From a computer that runs Windows 7, you attempt to connect to the Web site and are prompted for authentication. You verify that youruser account has permission to access the Web site. You need to ensure that you are automaticallyauthenticated when you connect to the Web site.  What should you do?()A、Create a complex password for your user account.B、Open Credential Manager and modify your credentials.C、Add the URL of the Web site to the Trusted sites zone.D、Add the URL of the Web site to the Local intranet zone.

You copy a Web site from a development site to a staging site. You do not have the Web site in a source control application. Another developer begins to fix bugs on the staging site while the development team adds features on the development site. You need to synchronize the development site and the staging site and copy the latest version of each file to both locations. What should you do? ()A、Use the Copy Web tool.B、Create a Web Setup project.C、Use the Publish Web tool.D、Use the command line to XCOPY the files.

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 toolB、the Code Access Security Policy toolC、the ASP.NET IIS Registration toolD、the Web Site Administration Tool

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.

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.

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.exeB、InstallUtil.exeC、CSC.exeD、aspnet_wp.exe

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、BehaviorEditorPartB、AppearanceEditorPartC、PropertyGridEditorPartD、LayoutEditorPart

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

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.exeB、InstallUtil.exeC、CSC.exeD、aspnet_wp.exe

单选题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?()Aaspnet_compiler.exeBInstallUtil.exeCCSC.exeDaspnet_wp.exe

单选题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?()Abool isMember = Roles.GetUsersInRole(Administrators).Any()Bbool isMember = Membership.ValidateUser(User.Identity.Name, Administrators)Cbool isMember = Roles.GetRolesForUser(Administrators).Any()Dbool isMember = User.IsInRole(Administrators)

单选题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?()AAuthorization RulesBMachine KeyCPages And ControlsDSSL Settings

单选题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?()ATo achieve the goal, the Login URL property for the Forms Authentication Settings should be configured to the userlogin.aspx filename.BTo achieve the goal, the Default Document setting should be configured to add the userlogin.aspx filename in the Web site properties.CTo achieve the goal, the Forms Authentication Settings should be configured to Require SSL.DTo achieve the goal, the Name property of the Cookie Settings should be configured to the userlogin.aspx filename.

单选题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? ()Athe Microsoft .NET Framework Configuration toolBthe Code Access Security Policy toolCthe ASP.NET IIS Registration toolDthe Web Site Administration Tool

单选题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?()ASet the .NET Framework trust level to Full for the Web site.BSet the .NET Framework trust level to Low for the Web site.CSet the .NET Framework trust level to High for the Web site.DSet the .NET Framework trust level to Medium for the Web site.

单选题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?()AAuthenticationBAuthorization RulesCIIS Manager PermissionsDSSL Settings

单选题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?()AVerify that Management Service has been started.BReconfigure the file system permissions for the root folder of the Web site.CReconfigure Management Service to enable Windows And IIS Manager Credentials.DVerify the Authentication settings for the Web site.

单选题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? ()Aaspnet_compiler.exeBInstallUtil.exeCCSC.exeDaspnet_wp.exe

单选题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?()AThe ASP.NET Impersonation setting should be configured to Enabled. Edit the ASP.NET Impersonation setting by specifying the new local user account.BThe Windows Authentication setting should be configured to Enabled.CThe Forms Authentication setting should be configured to Enabled by using all the default settings.DThe ASP.NET State Service should be configured to log on to the new local user account by using the Services console.