Microsoft Developing ASP.NET MVC 4 Web Applications - 70-486 FREE EXAM DUMPS QUESTIONS & ANSWERS

You are developing an ASP.NET MVC application.
The application has a contact view includes a form for editing the displayed contact.
You need to save the Contact object model when the form is posted back to the EditContact method using a POST method request.
Which code segment should you use? Each correct answer presents a complete solution. Choose all that apply.
Correct Answer: A,C Vote an answer
You are designing a distributed application that runs on the Windows Azure platform.
The application must store a small amount of insecure global information that does not change frequently.
You need to configure the application to meet the requirements.
Which server-side state management option should you use? (Each correct answer presents a complete solution. Choose all that apply.)
Correct Answer: C Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
You are developing an ASP.NET MVC application that will be deployed on a web farm.
Passwords must be stored in the web.config file and must not be readable or in a format that is easily decodable You need to encrypt the passwords that are stored in the web.config file.
Which command-line tool should you use?
Correct Answer: D Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
You develop an ASP.NET MVC application. The application has a controller named PeopleController.cs. The controller has an action method that returns a parent view. The parent view includes the following code. Line numbers are included for the reference only.

The application also contains a partial view named People. The parent view must display the partial view.
You need to add code at line 09 to display the partial view within the parent view.
Which two code segments will achieve the goal? Each correct answer presents a complete solution.
Correct Answer: D Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
You are developing an ASP.NET MVC application by using Microsoft Visual Studio Professional. You plan to deploy the app to a Microsoft Azure App Services Web App.
You must be able to edit files in the webjpplication directly without having to redeploy or use other means of connecting to the web application.
You need to update the Web.config file to enable remote error messages.
What should you do?
Correct Answer: B 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 questions 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 are developing a collaborative text editor. Multiple users may simultaneously edit the same document from within the application.
You need to ensure that users can see edits from all users as soon as they are made.
Solution: Implement the application by using ASP.NET Core. Configure the editor Controller action to return JSON data. Use XML HTTP requests for communicating editor changes.
Does the solution meet the goal?
Correct Answer: A Vote an answer
If the canvas element is supported by the client browser, the application must display "London 2012" in the footer as text formatted by JavaScript at the end of the _Layout.cshtml file.
You need to modify the layout to ensure that "London 2012" is displayed as either formatted text or as plain text, depending on what the client browser supports.
Which code segment should you add?
Correct Answer: B Vote an answer
You are developing an ASP.NET MVC application. You plan to use OAuth to authenticate users to the application.
You need to use the correct authentication data in the application.
What should you do? To answer, drag the appropriate data element to the correct location or locations. Each data element 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:
Live Connect implements the OAuth 2.0 protocol to authenticate users.
In the authorization code grant flow, the client makes authorization requests by using request_type=code.
The following diagram illustrates how the authorization code grant flow works.

1. The client starts the flow by directing the resource owner's user agent to the Live Connect authorization endpoint, by using a URL in the following format.
https://login.live.com/oauth20_authorize.srf?client_id=CLIENT_ID&scope=SCOPES&response_type=code&redirect_uri=REDIRECT_URI
2. The authorization server authenticates the resource owner via the user agent, and establishes whether the resource owner grants or denies the client's access request.
3. Assuming that the resource owner has granted access, the Live Connect authorization server redirects the user agent to the client by using the redirection URI that was provided in the initial request.
4. The user agent calls the client with the redirection URI, which includes an authorization code and any local state that was provided by the client. For example: http://contoso.com/Callback.htm?code=AUTHORIZATION_CODE.
5. The client requests an access token from the authorization server's token endpoint by using its client credentials for authentication, and includes the authorization code that was received in the previous step.
6. If the credentials are valid, the authorization server responds by returning an access token.
References: https://msdn.microsoft.com/en-us/library/hh243647.aspx
You develop an ASP.NET MVC application that displays Information about products that a company sells. The application contains two classes named ProductController and RouteConfig You have the following requirements:
- If a value is provided for the Id property, you must display information about an individual product.
- If no value is provided for the Id property, you must display information about all products.
You need to configure routing.
How should you complete the relevant classes? to answer, select the appropriate code segment from each list in the answer area.
Correct Answer:
You have two Microsoft Azure subscriptions. One subscription emits logs. You plan to deploy audit tools to the other subscription to allow users to analyze logs that the first subscription emits.
You perform the following anions
* Configure resource diagnostic logs for non-compute resources in the Azure portal.
* Use Event Hubs metrics and set the log category to Operational Logs.
* Set a retention policy of seven days.
Users report that no log files are available
You need to ensure that log files are available for users.
Correct Answer: A Vote an answer
You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessed by many users.
The application must handle web server failures gracefully. The servers in the farm must share the short-term state information.
You need to persist the application state during the session.
What should you implement?
Correct Answer: C Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
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 application to be used on the Internet. The environment uses Active Directory with delegation to access secure resources.
Users must be able to log on to the application to maintain their personal preferences.
You need to use the least amount of development effort to enable users to log on.
What should you do?
Correct Answer: B Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
You are developing an ASP.NET solution that consists of the following components:

You plan to use Microsoft Azure DevTest labs to create a testing environment. You create a virtual hard disk for the web front-end that includes all required components for the legacy applications.
The front-end application virtual machines must meet the following requirements:
Redeploy the virtual machines with the latest versions of build artifacts from the build system when they become available.
Isolate the virtual machines by using virtual networks.
You need to recommend an approach to deploy the virtual machines.
What should you recommend? To answer, drag the appropriate virtual machine deployment approaches in Azure DevTest to the correct targets. Each answer choice 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 are developing an ASP.NET MVC application. The application includes the following HomeController class. Line number are included references only.

During testing, all errors display an ASP.NET error page instead of the expected error view.
Correct Answer: C Vote an answer
0
0
0
10