单项选择题You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production. You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file. What should you do? ()

A. Modify the application settings by using the Web Site Administration Tool.
B. Modify the application settings by using the Visual Studio property page editor for the project.
C. Modify the application settings by using the resource editor.
D. Modify the application settings by using the Visual Studio start options editor.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题You write a Web application. This application must support multiple languages. You store the localized strings in the application as resources. You want these resources to be accessed according to a users language preference. You create the following resource files in the App_GlobalResources folder of your application. myStrings.resx myStrings.en-CA.resx myString.en-US.resx myStrings.fr-CA.resx myStrings.es-MX.resxEach resource file stores a localized version of the following strings: Name, E-mail, Address, and Phone. You create a Web Form that contains one label for each of these strings. You need to ensure that the correct localized version of each string is displayed in each label, according to a users language preference. What should you do? ()

A. Add the following configuration section to the Web.config file.
B. Set the directive for each page in your site as follows: <%@ page="" uiculture="”Auto”">
C. Add the following code segment to the pages load event.lblName.Text = @”{myStrings}Name”; lblAddress.Text = @”{myStrings}Address”; lblEmail.Text = @”{myStrings}Email”; lblPhone.Text = @”{myStrings}Phone”;
D. Add the following code segment to the pages load event.lblName.Text = Resources.myStrings.Name; lblAddress.Text = Resources.myStrings.Address; lblEmail.Text = Resources.myStrings.Email; lblPhone.Text = Resources.myStrings.Phone;

2.单项选择题You are using the ASP.NET membership APIs to manage user accounts for a Web site. The Web.config file contains the definition for the membership provider. After modifying the Web.config file to enable password recovery, you create a PasswordReset.aspx file. You need to enable users to reset their passwords online. The new passwords must be sent to them by e-mail after they have logged on through the Login.aspx page. In addition, users must be required to answer their secret questions before resetting their passwords. Which code logic should you use? ()

A. Add a PasswordRecovery element to the PasswordReset.aspx file and configure it.
B. Modify the Page_Load to set the Membership.EnablePasswordReset to True in the PasswordReset.aspx file.
C. Add a ChangePassword element to the PasswordReset.aspx file and configure it.
D. Modify the Login.aspx form to include a Required Field validator on the secret question answer text box. Then redirect users to the PasswordReset.aspx file.

3.单项选择题You are working on an existing Web site. You need to secure the Web site by redirecting all users to the logon page, Login.aspx. After logging on, users must be sent back to the page that they originally requested. Which code segment should you use? ()

A. In the Web.config file: <authorization> <deny users=”?”/></authorization> On each page in the Web site: void Page_Load(Object sender, EventArgs E){ FormsAuthentication.Initialize(); //Rest of the Page_Load code goes here}
B. On each page in the Web site: void Page_Load(Object sender, EventArgs E){ FormsAuthentication.RedirectToLoginPage(“login.aspx”); //Rest of the Page_Load code goes here}
C. On each page in the Web site: void Page_Load(Object sender, EventArgs E){ Response.Redirect(“login.aspx”);//Rest of the Page_Load code goes here}
D. In the Web.config file: <authentication mode=”Forms”> <forms name=”.ASPXUSERDEMO” loginUrl=”login.aspx” protection=”All”timeout=”60” /> </authentication>

4.多项选择题You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database. You add the following code segment to the Web.config file. Which two additional actions should you perform?()

A. Use Aspnet_regsql.exe to create the Microsoft SQL Server database.
B. Set Login1's MembershipProvider property to MySqlProviderConnection.
C. Add the following code segment to the Web.config file.<connectionStrings> <add name="MySqlProviderConnection" connectionString="valid connection string" /></connectionStrings>
D. Add the following code segment to the Web.config file.  <appSettings><add key="MySqlProviderConnection" value="valid connection string" /></appSettings>
E. In the ASP.NET configuration settings within IIS, ensure that Role Management Enabled is selected.
F. Use the Web Site Administration Tool to select AspNetSqlMembershipProvider as the membership provider for your application.


5.多项选择题You develop a Web application that writes data to a file on a server. You restrict access to the file to specific Windows users. The Web application runs as CONTOSO\ASPNET. You deny anonymous access to the application in IIS. You add the following XML segment in the Web.config file. You need to ensure that the application meets the following requirements: 1. It must impersonate the user when it writes data to the file 2. It must run as CONTOSO\ASPNET when a user does not access the file. Which two actions should you perform?()

A. Use the following XML segment in the Web.config file.<identity impersonate="false"/>
B. Use the following XML segment in the Web.config file.  <identity impersonate="true"/>
C. Use the following code segment to access the file. WindowsPrincipal wp =(WindowsPrincipal)HttpContext,Current.User;WindowsIdentity wt = (WindowsIdentity)wp.Idetity;WindowsImpersonationContext wic = wi.Impersonate();// Access The file herewic.Undo();
D. Use the following code segment to access the file. WindowsIdentity wi = WindowsIdetity.GetCurrent();WindowsImpersonationContext wic = WindowsIdentity.Impersonate(wi.Token);// Access the file herewic.Undo();


6.单项选择题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

7.单项选择题You create a Web site that is for members only. The behavior of the Web site changes according to the role of the user. The Web site uses the ASP.NET Membership control for creation of user accounts. You need to find out whether a user is a member of a particular role. What should you do? ()

A. Pass the user names and passwords to Membership.ValidateUser.
B. Pass the role names to User.IsInRole.
C. Pass the role names to Roles.RoleExists.
D. Pass the user names to Membership.GetUser.

9.多项选择题You are creating a Web Form. You write the following code segment to create a SqlCommand object. SqlConnection conn = new.SqlConnection(connString); conn.Open(); SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = “select cont(*) from Customers”; You need to display the number of customers in the Customers table. Which two code segments can you use to achieve this goal? ()

A. object customerCount = cmd.ExecuteScalar();lblCompanyName.Text = customerCount.ToString();
B. int customerCount = cmd.ExecuteNonQuery();lblCompanyName.Text = customerCount.ToString();
C. SqlDataReader dr = cmd.ExecuteReader();dr.Read();lblCompanyName.Text = dr[0].ToString();
D. SqlDataReader dr = cmd.ExecuteReader();dr.Read();lblCompanyName.Text = dr.ToString();

10.单项选择题You are transferring records from one database to another. You need to decide whether you can use the SqlBulkCopy class to transfer the records. What should you do? ()

A. Ensure that the source database is Microsoft SQL Server.
B. Ensure that the destination database is Microsoft SQL Server.
C. Ensure that the column names in the source table match the column names in the destination table.
D. Ensure that the bulk copy program (bcp) utility is installed on the destination server.

最新试题

You create a Web Form. The Web Form allows users to calculate values and display the results in a label named lblResults. You need to capture all unhandled exceptions on the Web Form through the Error event. The Error event must capture each unhandled exception and display it on the Web Form.Which code segment should you use?()

题型:单项选择题

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?()

题型:单项选择题

You create a Web Form that allows users to create a new account. You add a CreateUserWizard control by using the following code segment.You need to ensure that the wizard automatically sends an e-mail message to users when they finish creating their accounts. You add a valid element to the Web.config file.Which code segment should you add to the Page_Load event?()

题型:单项选择题

You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database. When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields. You need to ensure that the Web Form does not update if the user has not entered data in all of the fields.Which code segment should you use?()

题型:单项选择题

Certkiller .com's e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()

题型:多项选择题

Certkiller .com's e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()

题型:多项选择题

You create a Web application for your company's intranet. You want to enable users to customize their versions of the intranet home page. You create sections of content as Web Parts. You need to ensure that users can customize content at any time.Which two code segments should you use?()

题型:多项选择题

You are developing a Web application. Your code restricts access to some pages based on the users credentials. You need to configure IIS to supply the user's Windows credentials to your Web application. These credentials must be encrypted.What should you do? ()

题型:单项选择题

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? ()

题型:单项选择题

You deploy your companys Internet Web site. You need to deny anonymous access to the Web site, allowing only authenticated users. Which code segment should you use?()

题型:单项选择题