Upgrade your MCPD: Web Developer 4 to MCSD: Web Applications v6.0 (70-492)

Page:    1 / 9   
Total 129 questions

You need to modify the application to meet the productId requirement.
What should you do?


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : B

Explanation: The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method or property, and throws an exception if the condition for the contract fails.
Syntax:
'Declaration
Public Shared Sub Requires(Of TException As Exception) ( _
condition As Boolean _
)

Type Parameters -

TException -
The exception to throw if the condition is false.

Parameters -
condition

Type: System.Boolean -
The conditional expression to test.
Reference: Contract.Requires(Of TException) Method (Boolean)

You need to implement the requirements for handling IIS errors.
What should you do?


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : B

You need to implement client-side animations according to the business requirements.
Which line of code should you use? (Each correct answer presents a complete solution.
Choose all that apply.)

  • A. $("body h1:nth-child(1)").fadeIn(1000);
  • B. $("body h1:nth-child(1)")-fadeOut(1000);
  • C. $("body h2:nth-child(1)").animate({ opacity: 0 });
  • D. $("body h1:nth-child(1)").animate({ opacity: 1 });


Answer : B,C

You need to add a method to the ProductController class to meet the exception handling requirements for logging. Which code segment should you use?


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : C

An advertising campaign was recently launched. Some of the ads contain a link to products that no longer exist or have IDs that have changed.
You need to ensure that all product links display a product.
Which code segment should you use to configure the route?


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : A

You are designing a Windows Communication Foundation (WCF) service that uses the
Product class. You need to update the class to meet the storage requirement.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

  • A. Mark the Product class with the DataContract attribute.
  • B. Mark the public members of the Product class with the DataContractFormat attribute.
  • C. Mark the Product class with the CollectionDataContract attribute.
  • D. Mark the public members of the Product class with the DataMember attribute.


Answer : A,D

The GetDealPrice method must be called by using Ajax.
You need to get the price of a product by using the GetDealPrice method of the
ProductController.
Which code segment should you use? (Each correct answer presents a complete solution.
Choose all that apply.)



A. Option A -

B. Option B -

C. Option C -

D. Option D -



Answer : C,D Topic 5, ASP.NET MVC application in Visual Studio 2012 Background You are developing an ASP.NET MVC application in Visual Studio 2012 that will be used to process orders. Business Requirements The application contains the following three pages. ? A page that queries an external database for orders that are ready to be processed. The user can then process the order. ? A page to view processed orders. ? A page to view vendor information. The application consumes three WCF services to retrieve external data. Technical Requirements The solution contains the following four projects. A WCF service project used to communicate with the external order database. An ASP.NET MVC project used for order processing and logging order metadata. A WCF service project used to submit order data to an external data source. A WCF service project used to acquire shipping information. Entity Framework is used for data access. The entities are defined in the ExternalOrders.edmx file as shown in the following diagram.

The project contains two services defined in the following files. ? IExternalQueueService.es ? ExternalQueueService.svc. The ExternalQueue.Helpers namespace contains a definition for a class named OrderNotFoundException. Entity Framework is used for data access. The entities are defined in the ProcessedOrders.edmx file as shown in the following diagram.
The classes are contained in the OrderProcessor.Entities namespace. The project contains the following two controllers. ? InboundQueueController.es ? ProcessedOrderController.es WCF service proxies to the ExternalQueue, Shipping and OrderUpload services have been generated by using the command prompt. The ExecuteCommandProcedure() method in the ExternalQueueService.svc file must run asynchronously. The ProcessedOrderController controller has the following requirements. ? The Get

The DeleteExternalOrder() method in the ExternalQueueService service is not throwing a
FaultException exception as defined by the FaultContractAttribute attribute in the
IExternalQueueService.cs file.
You need to throw the FaultException exception.
Which code segments can you insert at line EQ45 to achieve this goal? (Each correct answer presents a complete solution. Chose all that apply.)


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : C,D

The UploadOrder() method in the UploadCallbackService service is not implementing the callback behavior defined in the IUploadCallBackService interface.
You need to modify the class to implement the required callback behavior.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segments may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)




Answer :

The GetVendorPolicy() private method in the ProcessedOrderController controller is returning a
CacheItemPolicy object with default values. The returned policy must expire if the external file located at C:\Triggers\VendorTrigger.txt has been modified or the timeout outlined in the technical requirements is reached.
You need to return the policy.
How should you build the method? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)




Answer :

Explanation:

http://msdn.microsoft.com/en-us/library/system.runtime.caching.cacheitempolicy.aspx

The GetVendors() action in the ProcessedOrderController controller is querying the database each time it is run. The GetVendors() action must query the database only if the cache is null.
You need to add code to the action at line PC33 to cache the data.
Which code segment can you use? (Each correct answer presents a complete solution.
Choose all that apply.)


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : C,D

You need to modify the ExecuteCommandProcedure() method to meet the technical requirements. Which code segment should you use?


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : A

The DeleteExternalOrder() method in the ExternalQueueService service is not throwing a
FaultException exception as defined by the FaultContractAttribute attribute in the
IExternatQueueService.cs file.
You need to throw the FaultException exception.
Which code segment can you insert at line EQ45 to achieve this goal? (Each correct answer presents a complete solution. Chose all that apply.)


  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : C

You need to modify the ExecuteCommandProcedure() method to meet the technical requirements. Which code segment should you use?




Answer :

The GetQueueItems() action in the InboundQueueController controller is not populating the view with data. The action must populate the view with data by calling the
GetExternalOrders() method in the ExternalQueueService service using the
ChannelFactory class.
You need to modify the action to populate the view with data.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)




Answer :

Page:    1 / 9   
Total 129 questions