Question: 60. You are creating an ASP.NET application for XYZ’s human resources (HR) department. Users in the HR department will use the application to process new employees. The application automates several activities that include creating a network login account, creating an e-mail account, registering for insurance benefits, and other activities. During integration testing of your application, you need to verify that the individual activities run successfully and in the proper order. Each page in your application includes the following elements in the Page directive: Debug=”True” Trace=”True” You want each page to provide execution information in the Web browser immediately after the page’s normal display output. You need to add instrumentation to the code in your pages to accomplish this goal. Which statement should you use? A. Trace.Write B. Debug.Print C. System.Diagnostics.Trace.Write D. System.Diagnostics.Debug.Write E. System.Diagnostics.Debugger.Log Answer: A Explanation: We simply use the Trace.Write method. Incorrect Answers B, D, E: As we want to test the product during integration we need to trace the application, not only debug it. C: Question: 61.You are creating an ASP.NET accounting application that stores and manipulates data in a Microsoft SQL Server database. One of the pages in the application will be used for performing month-end operations to calculate the balances of all accounts. When a user clicks a button on the page, you want your code to run several stored procedures to calculate the month-end balances. These procedures must all succeed before the calculated balances can be stored in the database. If any of the procedures fail, then you do not want to store any of the month-end calculated balances. While the procedures are running, you do not want any users to be able to edit, add, or delete data in the tables affected by the procedures. What should you do? A. Create a class derived from System.EnterpriseServices.ServicedComponent to run the stored procedures. Annotate the class by using a TransactionAttribute type of attribute. Set the Value property of the attribute to TransactionOption.RequiresNew.
Exam Name: Developing and Implementing Web Applications with Microsoft Visual Basic.NET Exam Type: Microsoft Exam Code: 70-305 Total Questions: 212 Page 48 of 144
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