PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You create an ASP.NET application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
To access a Microsoft SQL Server database, the application reads the following connection string from the Web.config file.

Server=SQL1;Database=Contoso;Integrated Security=SSPI;

The application is configured to use the Microsoft Internet Information Services (IIS) anonymous authentication.
You deploy the application to a production server that hosts several corporate ASP.NET applications.
You discover that database authentication fails on the production server. You need to ensure that the application can connect to the database.
You also need to ensure that no additional applications are granted access to the database.
What should you do?

Which code fragment should you add on Line 07?

You are creating a Windows Forms application by using the .NET Framework 3.5. You write the following code segment to update multiple databases on a SQL Server 2008 database. (Line numbers are included for reference only.)

01 string connectionStringCustomer = @”DataSource=CUSTOMER;Integrated Security= SSPI;”;
02 string connectionStringOrders = @”Data Source=ORDER;Integrated Security= SSPI;”;
03 SqlCommand cmdCustomer = new SqlCommand();
04 SqlCommand cmdOrders = new SqlCommand();
05 SqlConnection cnnCustomer =new SqlConnection(connectionStringCustomer);
06 SqlConnection cnnOrders =new SqlConnection(connectionStringOrders);
07

You need to ensure that all database updates are included in a single distributed transaction.Which code fragment should you add on Line 07?

Which three test scenarios should you recommend?

You are an enterprise application developer. You are designing unit tests for a Customer class. The Customer class contains properties to get or set data in private fields. The Customer class also contains one default constructor and one non-default constructor. The non-default constructor accepts a Customer ID argument. When the non-default constructor is used to instantiate the Customer object, a public method named Load is invoked along with the Customer ID argument. The Customer object properties are then loaded by using values from the database. You need to design unit tests that will test the class properties.
Which three test scenarios should you recommend? (Each correct answer presents part of the solution. Choose three.)

What should you do?

You are creating a Windows application that processes sales orders by using the .NET Framework
3.5.
The application has the following specifications:
It connects to a Microsoft SQL Server 2008 database.
It retrieves data from a table named Products.
The product table has three columns named Name, Description, and Quantity. The application uses the
Name and Description columns as lookup fields. It updates the Quantity column when orders are placed.
You need to design a concurrency management strategy that meets the following requirements:
Data integrity is maintained during the update process.
Database locking for the lookup data is minimal.
What should you do?

What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application includes a server component that implements business rules and communicates with a Microsoft SQL Server database.
The component is implemented as a .NET Framework 3.5 assembly. You discover that the performance of the application degrades over a period of time.
You need to gather data on the performance of the component. You also need to minimize the effect of logging on the performance of the application.
What should you do?

What should you do?

You are creating a Windows application by using the .NET Framework 3.5.
The application will be used for processing sales orders.
Individual product quantities are retrieved from the database before an order is placed. The product
quantity is reduced after an order is placed.
You need to design a concurrency model to ensure that the correct product quantity on hand is displayed
at all times.
What should you do?

What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application has the following specifications:
– Obtains data from a Web service and the corporate database.
– Uses the data to perform lengthy mathematical calculations.
– The application takes a long time to display the results.
You need to ascertain the cause of the slow response time. You also need to gather as much detailed data as possible.
What should you do?