最新的Microsoft Developing ASP.NET MVC 4 Web Applications - 70-486免費考試真題
The designer for the website gave you the following image as the design for the page.

The normal color for the tab is *2da4c2, and the color when the mouse is over the tab is #ffd800.
The HTML that implements the navigation tab is as follows.

You need to implement the design.
What should you do? (To answer, select the appropriate options in the answer area.)



The normal color for the tab is *2da4c2, and the color when the mouse is over the tab is #ffd800.
The HTML that implements the navigation tab is as follows.

You need to implement the design.
What should you do? (To answer, select the appropriate options in the answer area.)


正確答案:

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 an ASP.NET Core MVC web application.
The application must be exposed to external users over ports 80 and 443 and must meet the following requirements:
Handle more than 1024 simultaneous connections.
Support Windows authentication.
Support HTTP/2 over TLS.
Include response caching.
Protect against denial-of-service attacks.
You need to deploy the application to an on-premises web server.
Solution: You deploy the application to HTTP.sys.
Does the solution meet the goal?
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 an ASP.NET Core MVC web application.
The application must be exposed to external users over ports 80 and 443 and must meet the following requirements:
Handle more than 1024 simultaneous connections.
Support Windows authentication.
Support HTTP/2 over TLS.
Include response caching.
Protect against denial-of-service attacks.
You need to deploy the application to an on-premises web server.
Solution: You deploy the application to HTTP.sys.
Does the solution meet the goal?
正確答案: B
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.

During testing, all errors display an ASP.NET error page instead of the expected error view.
正確答案: B
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 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 a custom formatter class to the Web API and implement the IOutputFormatter interface.
Does the solution meet the goal?
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 a custom formatter class to the Web API and implement the IOutputFormatter interface.
Does the solution meet the goal?
正確答案: B
You are developing an ASP.NET MVC application that will run on Azure.
The application uses Event Tracing for Windows (ETW) for logging operations.
You need to retrieve the ETW data for the application from a deployed Azure instance by using the Azure Diagnostics API.
Which data source should you use?
The application uses Event Tracing for Windows (ETW) for logging operations.
You need to retrieve the ETW data for the application from a deployed Azure instance by using the Azure Diagnostics API.
Which data source should you use?
正確答案: A
說明:(僅 Fast2test 成員可見)
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?
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?
正確答案: A
說明:(僅 Fast2test 成員可見)
You updated the web.config file with the HTTP run-time value required to display an alternative version of the site.
You need to ensure that the correct page displays to the users.
Which code segment should you use to update the controller?
You need to ensure that the correct page displays to the users.
Which code segment should you use to update the controller?
正確答案: A
You are developing a new ASP.NET MVC application that will be hosted on Microsoft Azure. You need to implement caching.
The caching solution must support the following:

You need to select a cache solution.
Which caching solution should you choose?
The caching solution must support the following:

You need to select a cache solution.
Which caching solution should you choose?
正確答案: A
You are developing an ASP.NET MVC application.
Before an action is executed, information about the action must be written to a log. After results are returned, information about the results also must be written to the log.
You need to log the actions and results.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to implement the LogActionFilter class? (To answer, select the appropriate option from the drop-down list in the answer area.)

Before an action is executed, information about the action must be written to a log. After results are returned, information about the results also must be written to the log.
You need to log the actions and results.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to implement the LogActionFilter class? (To answer, select the appropriate option from the drop-down list in the answer area.)

正確答案:

Explanation:
Target 1: IActionFilter
MVC3 introduced a completely new pattern to configure filters for controllers and its actions. While injection of filter attributes is still supported it is recommended using this new pattern for filter configuration because it has the advantage to support constructor injection and does not require the InjectAttribute anymore.
First of all you have to create your filter class by implementing one of the filter interfaces e.g. IActionFilter.
Target 2: public void OnActionExecuting(ActionExecutingContext filterContext) Target 3: public void OnActionExecuted(ActionExecutedContext filterContext) References:
You are developing an ASP.NET MVC web application in Visual Studio 2012.
The application has a model named ReservationLocation that contains properties named City and State.
The view that displays reservations has a single text box named loc for entering the location information. The location is entered as city, state.
There are action methods that have ReservationLocation as a parameter type.
You need to ensure that the City and State properties are correctly populated.
How should you implement model binding for the ReservationLocation type? (To answer, drag the appropriate code segment to the correct location or locations. 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.)

The application has a model named ReservationLocation that contains properties named City and State.
The view that displays reservations has a single text box named loc for entering the location information. The location is entered as city, state.
There are action methods that have ReservationLocation as a parameter type.
You need to ensure that the City and State properties are correctly populated.
How should you implement model binding for the ReservationLocation type? (To answer, drag the appropriate code segment to the correct location or locations. 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.)

正確答案:

You are developing an ASP.NET MVC web application that requires HTML elements to take on new behaviors. These should be implemented with a behavior script in a page that is only for Microsoft Internet Explorer users.
The colorchange.js script uses the Microsoft CSS vendor-specific Behavior extension. You need to apply the script with CSS.
You need to use the script to change the color of text.
You have the following markup:

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

The colorchange.js script uses the Microsoft CSS vendor-specific Behavior extension. You need to apply the script with CSS.
You need to use the script to change the color of text.
You have the following markup:

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

正確答案:

You are developing an ASP.NET MVC application. The application uses a set of custom exceptions to log errors that occur during the execution of an action.
You need to develop a class that implements logging.
Which interface should you implement?
You need to develop a class that implements logging.
Which interface should you implement?
正確答案: B
說明:(僅 Fast2test 成員可見)
You are developing an ASP.NET MVC application. The application uses a SQL Server database and a SQL Server login and password. You need to ensure that the password for the SQL Server login is not stored in plain text. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
正確答案: B,D
You are developing an ASP.NET MVC application that has pages for users who browse the site with Windows Phone 7.
The pages for Windows Phone 7 include the following files:

You need to update the application so that it renders the customized files correctly to Windows Phone 7 users.
How should you update the Application_Start method? (To answer, drag the appropriate line of code to the correct location or locations. Each line of code 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.)

The pages for Windows Phone 7 include the following files:

You need to update the application so that it renders the customized files correctly to Windows Phone 7 users.
How should you update the Application_Start method? (To answer, drag the appropriate line of code to the correct location or locations. Each line of code 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.)

正確答案:

Explanation:
http://techbrij.com/1013/display-mode-mobile-tablet-tv-aspnet-mvc
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.

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.

正確答案:
