70-494 Exam - Recertification for MCSD: Web Applications

certleader.com

Q1. DRAG DROP - (Topic 5) 

You are developing an ASP.NET MVC Web API application. 

The methods of the Web API must return details about the result of the operation. 

You need to create methods to update and delete users. 

You have the following code: 

Which code segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5 to complete the code? (To answer, drag the appropriate code segments to the correct targets 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:  

Q2. DRAG DROP - (Topic 2) 

You need to complete the GetProcessedOrders() action in the ProcessedOrderController controller to meet the requirements. 

You have the following code: 

Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to complete the code? (To answer, drag the appropriate code segments to the correct targets 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:  

Q3. - (Topic 5) 

You are developing an ASP.NET MVC web application that contains the following HTML. 

<table id= “customer” ></table> 

You also have an ASP.NET Web API application that contains a call for retrieving 

customers. 

You must send and retrieve the data in the most compact format possible. 

You need to update the HTML for the customers table to contain data from the Web API 

application. 

Which script segment should you use? 

 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q4. DRAG DROP - (Topic 2) 

You need to create the ShippingContext class in the ShippingAddress.cs file to meet the requirements. 

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:  

Q5. DRAG DROP - (Topic 5) 

You are developing an ASP.NET MVC application that allows users to log on by using a third-party authenticator. 

You need to configure Microsoft Azure Access Control Services and the application. 

Which five actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.) 

Answer:  

Q6. - (Topic 5) 

You are developing an ASP.NET MVC application that uses forms authentication. 

Authentication credentials must be encrypted and secure. 

You need to ensure that user credentials are persisted after users log on. 

Where should you store the credentials? (Each correct answer presents a complete 

solution. Choose all that apply.) 

A. In TempData 

B. In Session 

C. In ViewData 

D. In a cookie 

Answer: B,D 

Q7. - (Topic 5) 

You are developing a .NET application that uses the HttpClient type to call an ASP.NET Web API application. The API call returns a list of customers in JSON format and logs the results. The URL for the API call is in a variable named address. 

You need to make the API call without blocking. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q8. - (Topic 1) 

You need to implement the Get() method in the bookstore Web API application to be able to find books by using an ad hoc query. 

Which method should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Topic 2, Scenario 2 

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 

Visual Studio Solution: 

The solution contains the following four projects. 

. ExternalQueue: A WCF service project used to communicate with the external order database. 

. OrderProcessor: An ASP.NET MVC project used for order processing and logging order metadata. 

. OrderUpload: A WCF service project used to submit order data to an external data source. 

. Shipping: A WCF service project used to acquire shipping information. 

ExternalQueue Project: 

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.cs 

. ExternalQueueService.svc. 

The ExternalQueue.Helpers namespace contains a definition for a class named OrderNotFoundException. 

OrderProcessor Project: 

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: 

. InboundQueueControIler.cs 

. ProcessedOrderController.cs 

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 GetVendorPolicy() method must enforce a 10 minute absolute cache expiration policy. 

. The GetProcessedOrders() method must return a view of the 10 most recently processed orders. 

OrderUpload Project: 

The project contains two services defined in the following files: 

.IUploadCallbackService.cs 

.UploadCallbackService.svc 

Data Access is maintained in a file named UploadOrder.cs. 

Shipping Project: 

Entity Framework is used for data access. The entities are defined in the ExternalOrders.edmx file as shown in the following diagram. 

The Custom Tool property for ExternalOrders.edmx has been removed. 

POCO classes for the Entity Model are located in the ShippingAddress.cs file. The POCO entity must be loaded by using lazy loading. 

The project contains two services defined in the following files: 

. IShippingService.cs 

. ShippingService.svc 

The IShippingService contract must contain an operation that receives an order number as a parameter. The operation must return a class named ShippingInfo that inherits from a class named State. 

Application Structure 

ExternalQueue\IExternalQueueService.cs 

OrderProcessor\IExternalQueueService.svc 

ExternalQueue\ProcessedOrderController.cs 

OrderProcessor\InboundQueueController.cs 

OrderUpload\IUploadCallbackService.cs 

OrderUpload\UploadCallbackService.svc 

Shipping\IShippingService.cs 

Shipping\ShippingAddress.cs 

Q9. - (Topic 5) 

You develop an ASP.NET MVC application that is secured by using SSL. You are ready to 

deploy the application to production. 

The deployment package must include the installation of the SSL certificate. 

You need to configure the deployment package to meet the requirement. 

What should you do? 

A. Create a web publish pipeline target file with a custom web deploy target. 

B. In the Package/Publish settings of the project, select the All Files in this project option. 

C. Extend the CopyAllFilesToSingleFolder target in the project file. 

D. In the Build Events settings of the project, configure a pre-build event to include the SSL certificate. 

Answer:

Explanation: 

Ref: http://msdn.microsoft.com/en-us/library/vstudio/dd394698(v=vs.100).aspx 

Q10. DRAG DROP - (Topic 5) 

You are configuring a web application for deployment. 

You need to create a SetParameters.xml file to configure the IIS application pool. You have the following markup: 

Which configuration values should you include in Target 1 and Target 2 to complete the markup? (To answer, drag the appropriate configuration values to the correct targets in the answer area. Each configuration value 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: