PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. The service connects to a Microsoft SQL Server 2008 database. The service is hosted by an Internet Information Services (IIS) 6.0 Web server.

The application works correctly in the development environment. However, when you connect to the service on the production server, attempting to update or delete an entity results in an error. You need to ensure that you can update and delete entities on the production server. What should you do?

Which code segment should you insert at line 03?

You use Microsoft Visual Studio 2010, Microsoft Sync Framework, and Microsoft .NET Framework 4 to create an application. You have a ServerSyncProvider connected to a Microsoft SQL Server database. The database is hosted on a Web server. Users will use the Internet to access the Customer database through the ServerSyncProvider. You write the following code segment. (Line numbers are included for reference only.)

01SyncTable customerSyncTable = new SyncTable(“Customer”);
02customerSyncTable.CreationOption = TableCreationOption. UploadExistingOrCreateNewTable;
03
04customerSyncTable.SyncGroup = customerSyncGroup;
05 this.Configuration.SyncTables.Add(customerSyncTable);

You need to ensure that the application meets the following requirements: “Users can modify data locally and receive changes from the server. “Only changed rows are transferred during synchronization. Which code segment should you insert at line 03?

Which configuration should you add to the web.config file?

You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list.

Class name: Task
Namespace: DevControls
Assembly: TestServerControl.dll
Base class: System.Web.UI.WebControls.WebControl

You copy TestServerControl.dll to the Web sites Bin folder.
You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive.
Which configuration should you add to the web.config file?

Which code segment should you insert at line 02?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. The application uses a DataTable named OrderDetailTable that has the following columns: “ID “OrderID “ProductID “Quantity “LineTotal Some records contain a null value in the LineTotal field and 0 in the Quantity field. You write the following code segment. (Line numbers are included for reference only.)

01DataColumn column = new DataColumn(“UnitPrice”, typeof(double));
02
03OrderDetailTable.Columns.Add(column);

You need to add a calculated DataColumn named UnitPrice to the OrderDetailTable object. You also need to ensure that UnitPrice is set to 0 when it cannot be calculated. Which code segment should you insert at line 02?

What should you do?

You have developed a Windows Forms server application by using Microsoft .NET Framework 4. Client applications connect to the server application to receive streaming media on demand on a single server. Each incoming connection is launched on a separate thread. As the number of client applications increases, users report that connection attempts intermittently fail. You need to ensure that users can connect to the server application even when the number of client applications increases. What should you do?