Microsoft Developing ASP.NET MVC 4 Web Applications - 70-486 Exam Practice Test

You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple cultures.
The application contains three resource files in the Resources directory:

Each file contains a public resource named Currency with the localized currency symbol. The application is configured to set the culture based on the client browser settings.
The application contains a controller with the action defined in the following code segment. (Line numbers are included for reference only.)

You need to set ViewBag.LocalizedCurrency to the localized currency contained in the resource files.
Which code segment should you add to the action at line 03?

Correct Answer: D Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You need to ensure that developers can connect to a Windows Azure role by using RDP.
What should you do?

Correct Answer: A Vote an answer
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET Core MVC web application. You have a legacy business system that sends data to the web application by using Web API. The legacy business system uses proprietary data formats.
You need to handle the proprietary data format.
Solution: Add an instance of a custom formatter class to the InputFormatters collection in MVC.
Does the solution meet the goal?

Correct Answer: B Vote an answer
You are preparing for the deployment of an ASP.NET MVC application. You need to generate a deployment manifest.
Which command-line tool should you use?

Correct Answer: D Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You are developing an ASP.NET MVC news aggregation application that will be deployed to servers on multiple networks.
The application must be compatible with multiple browsers. A user can search the website for news articles. You must track the page number that the user is viewing in search results.
You need to program the location for storing state information about the user's search.
What should you do?

Correct Answer: C Vote an answer
You are developing an ASP.NET MVC application that takes customer orders.
Orders are restricted to customers with IP addresses based in the United States.
You need to implement a custom route handler.
You have the following code:

Which code segments should you include in Target1, Target 2 and Target 3 to implement the route handler? To answer, drag the appropriate code segments to the correct targets. 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.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Example:
This class implements IRouteHandler and has only one method "GetHttpHandler". The main purpose of this class is to return the instance of CustomHandler class. In the constructor, we are passing the RequestContext to the handler.
{
public class CustomRouteHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
return new CustomHandler(requestContext);
}
}
References: http://msdn.microsoft.com/en-us/library/system.web.routing.iroutehandler.gethttphandler.aspx
You are developing an ASP.NET MVC application.
You need to choose the appropriate Visual Studio templates to use for each test goal.
Which Visual Studio Unit Test project templates should you use? To answer, drag the appropriate Unit Test project template to the correct test goal or test goals. Each project template 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.
Correct Answer:

Explanation:
Box 1: Coded UI Test Project
Automated tests that drive your application through its user interface (UI) are known as coded UI tests (CUITs). These tests include functional testing of the UI controls. They let you verify that the whole application, including its user interface, is functioning correctly. Coded UI Tests are particularly useful where there is validation or other logic in the user interface, for example in a web page. They are also frequently used to automate an existing manual test.
Box 2: Unit Test Project
Unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.[1] Intuitively, one can view a unit as the smallest testable part of an application.
Box 3: Web Performance and Load Test Project
Box 4: Web Performance and Load Test Project
A load test is a container of Web performance tests and unit tests.
A load test exposes many run-time properties that can be modified to generate the desired load simulation.
References: https://msdn.microsoft.com/en-us/library/dd286726.aspx
References: https://msdn.microsoft.com/en-us/library/ms182594(v=vs.110).aspx
You are developing an ASP.NET Core MVC web application. The application uses a custom tool named sectarget that performs security audits of the web application's assemblies. The custom tool was built in netstandardl.l and is packaged into a NuGet package named sectarget.
You need to ensure that the custom tool is run each time the web application is boat or published and that the latest version of sectarget is used each time the tool is run.
How should you complete the markup? To answer, drag the appropriate XML segments to the correct locations. Each XML 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 NOTE: Each correct selection is worth one point.
Correct Answer:
You deploy an ASP.NET MVC e-commerce application to a Microsoft Azure App Services Web App.
Users report that the Orders page displays incorrect date and time information. You are unable to reproduce the issue locally.
You need to configure Remote Debugging for the web application.
Which three 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.
Correct Answer:
You are developing a controller for an ASP.NET MVC application that manages message board postings.
The security protection built in to ASP.NET is preventing users from saving their HTML.
You need to enable users to edit and save their HTML while maintaining existing security protection measures.
Which code segment should you use?

Correct Answer: A Vote an answer
You need to configure session storage in the web.config file to meet the technical requirements for scalability.
Which SessionState mode should you use? (Each correct answer presents a complete solution. Choose all that apply.)

Correct Answer: B,C Vote an answer
You need to ensure that all the MVC controllers are secure.
Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.es?

Correct Answer: D Vote an answer
You develop an application that receives data input from users and from Internet of Things (IoT) devices across the Internet.
You must secure all data connections.
You need to implement security by using classes from the System.Net namespace.
Which classes should you use? To answer, drag the appropriate classes to the correct scenarios. Each class 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.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation:
References:
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/web-and-socket-permissions
You are developing an ASP.NET Core application. You have the following code:

You create a folder named Content in your project. You add a controller action that uses authorization and returns a FileResult object.
The application must meet the following requirements:
Use Kestrel as the server.
Serve static files from the wwwroot folder and publicly cache the files for five minutes.
Serve static from the Content folder to authorized users only.
Serve a default.html file from the wwwroot folder.
You need to configure the application.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Box 1: UseStaticFiles
For the wwwroot folder. We serve static files from the wwwroot folder
Box 2: UseStaticFiles
Box 3: UseStaticFiles
Serve static from the Content folder to authorized users only.
Note the two app.UseStaticFiles calls. The first one is required to serve the CSS, images and JavaScript in the wwwroot folder (Box 1), and the second call (box 3) for directory browsing of the content folder Code example:
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), @"MyStaticFiles")),
RequestPath = new PathString("/StaticFiles")
});
References:
https://jakeydocs.readthedocs.io/en/latest/fundamentals/static-files.html
You are developing an ASP.NET MVC web application that enables users to open Microsoft Excel files.
The current implementation of the ExcelResult class is as follows.

You need to enable users to open Excel files.
How should you implement the ExecuteResult method? (To answer, select the appropriate options in the answer area.)

Correct Answer:

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어