Create a key element that has a value attribute set to the connection string D

Create a key element that has a value attribute set

This preview shows page 63 - 65 out of 144 pages.

Create a key element that has a value attribute set to the connection string. D. In the authentication section, create an element named appSettings. Create an element named SQLConnection that has a value attribute set to the connection string. Answer: A Explanation: The appSettings element contains custom application settings. The appSetting element is placed in the configuration section. Each element added to the appSettings element has a key attribute and a value attribute. For example SQLConnection and a connection string respectively. Reference: .NET Framework General Reference, <appSettings> Element .NET Framework General Reference, <add> Element for NameValueSectionHandler and DictionarySectionHandler
Image of page 63
Exam Name: Developing and Implementing Web Applications with Microsoft Visual Basic.NET Exam Type: Microsoft Exam Code: 70-305 Total Questions: 212 Page 64 of 144 Incorrect Answers B, C: SQLConnection is a class, and cannot be used as an element in the configuration section of a Web.config file. D: The appSetting element is placed in the configuration section, not in the authentication section. Question: 83. You create a reporting application for XYZ’s Travel. You create several reports, each of which resides in its own folder under the Report folder. Each subfolder has the appropriate security rights sets for Microsoft Windows users. You write a function named ListReports that generate a list of available reports. You want to configure the application and the ListReports function to find out which reports are available to the current user. If a user is logged in by using Windows authentication, you want ListReports to apply that user’s rights. If the user is not logged in by using Windows authentication, you want ListReports to use the rights granted to the XYZtravel\ReportingAccount user account. The password for this user accounts is “p1XYZi32 Which two actions should you take? (Each correct answer presents part of the solution. Choose two) A. Add the following element to the Web.config file: <identity impersonate=”false”> B. Add the following element to the Web.config file. <identify impersonate=”true”> C. Add the following element to the Web.config file: <identity impersonate=”true” userName=”margiestravel\ReportingAccount” password=”p1XYZi32”> D. Add the following element to the Web.config file: <authorization> <allow user=”XYZtravel\ReportingAccount”> </authorization> E. Add code to the ListReports function to create and use a WindowsPrincipal object based on the XYZtravel\ReportingAccount user account only if no user is authenticated. F. Add code to the ListReports function to always create and use a WindowsPrincipal object based on the XYZstravel\ReportingAccount user account. Answer: B, E Explanation: B: We use the impersonate attribute of the identity element to specify that client impersonation is used on each request. We should use the value true.
Image of page 64
Image of page 65

You've reached the end of your free preview.

Want to read all 144 pages?

  • Spring '16
  • .NET Framework, Microsoft SQL Server, Microsoft Visual Studio

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture