最新的Microsoft UPG:Transition MCPD.NET Frmwrk 3.5 Web Dev to 4 Web Dev - 070-523免費考試真題

問題1
You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property. Which page event should add an event handler to?

正確答案: C
問題2
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Data Model (EDM) to define a Customer entity. You need to add a new Customer to the data store without setting all the customer's properties. What should you do?

正確答案: D
問題3
You are implementing an ASP.NET MVC 2 Web application. A controller contains the following code.
public ActionResult Edit(int id)
{
return View(SelectUserToEdit(id));
} public ActionResult Edit(Person person) { UpdateUser(person); return RedirectToAction("Index"); } The first Edit action displays the user whose details are to be edited, and the second Edit action is called when the Save button on the editing form is clicked to update the user details. An exception is thrown at run time stating that the request for action Edit is ambiguous. You need to correct this error and ensure that the controller functions as expected. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

正確答案: A,B
說明:(僅 VCESoft 成員可見)
問題4
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application uses the ADO.NET Entity Framework to model entities. The application allows users to make
changes to entities while disconnected from the central data store.
You need to ensure that when the user connects to the central data store and retrieves new data, the
application meets the following requirements:
*Changes made to the local data store in disconnected mode are preserved.
*Entities that have already been loaded into the local data store, but have not been modified by the user,
are updated with the latest data.
What should you do?

正確答案: A
問題5
You are creating a Windows Communication Foundation (WCF) service that is implemented as follows.
(Line numbers are included for reference only.)
01 [ServiceContract]
02 [ServiceBehavior(IncludeExceptionDetailsInFaults = true)]
03 public class OrderService
04 {
05 [OperationContract]
06 public void SubmitOrder(Order anOrder)
07 {
08 try
09 {
10 ...
11 }
12 catch(DivideByZeroException ex)
13 {
14
15 }
16 }
17 }
You need to ensure that the stack trace details of the exception are not included in the error information
sent to the client.
What should you do?

正確答案: B
問題6
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 server. You need to ensure that applications authenticate against user information stored in the database before the application is allowed to use the service. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

正確答案: C,E
問題7
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?

正確答案: A
問題8
You are creating an ASP.NET Web site. The site contains pages that are available to anonymous users.
The site also contains a page named Premium.aspx that provides premium content to only members of a
group named Subscribers.
You need to modify the web.config file to ensure that Premium.aspx can be accessed by only members of
the Subscribers group.
Which configuration should you use?

正確答案: B
說明:(僅 VCESoft 成員可見)
問題9
You need to design a solution for capturing an exception. Which approach should you recommend?

正確答案: A
問題10
You are planning a deployment process for a set of interrelated Web services.
You need to ensure maximum availability of the Web services in the event of a hardware or software
failure.
Which approach should you recommend?

正確答案: C