Ensurepass

Recertification for MCSD: Web Applications

 

QUESTION 31

HOTSPOT

You are developing an ASP.NET MVC application. The application includes the following code. Line numbers are included for reference only.

 

clip_image002

 

You add the following markup to the system.web section of the web.config file:

 

clip_image004

 

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

 

clip_image006

 

Correct Answer:

clip_image008

 

 

QUESTION 32< /span>

You are developing an ASP.NET MVC application by using Visual Studio 2012.

 

The application throws and handles exceptions when it runs.

 

You need to examine the state of the application when exceptions are thrown.

 

What should you do?

 

A.

From the Debug menu in Visual Studio 2012, select Exceptions. Enable the Thrown check box for Common Language Runtime Exceptions.

B.

From the Debug menu in Visual Studio 2012, select Exceptions. Disable the User- unhandled check box for Common Language Runtime Exceptions.

C.

Add the following code to the web.config file of the application.

<customErrors mode=”On” >

<error statusCode=”500″ redirect=”CustomErrors.html” />

</customErrors>

D.

Add the following code to the web.config file of the application.

<customErrors mode=”On” >

<error statusCode=”404″ redirect=”CustomErrors.html” />

</customErrors>

 

Correct Answer: A

 

 

QUESTION 33

You are developing an ASP.NET MVC web application for viewing a photo album. The application is designed for devices that support changes in orientation, such as tablets and smartphones. The application displays a grid of photos in portrait mode.

 

When the orientation changes to landscape, each tile in the grid expands to include a description. The HTML that creates the gallery interface resembles the following markup.

 

clip_image010

 

If this CSS is omitted, the existing CSS displays the tiles in landscape mode.

 

You need to update the portrait mode CSS to apply only to screens with a width less than 500 pixels.

 

Which code segment should you
use?

 

A.

@media resolution(max-width: 500px) {

. . .

}

B.

@media screen(min-width: Opx, max-width: 500px) {

. . .

}

C.

@media screen and (width <= 500px) {

. . .

}

D.

@media screen and (max-width: 500px) {

. . .

}

 

Correct Answer: D

 

 

QUESTION 34

HOTSPOT

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.

 

clip_image012

 

You need to enable users to open Excel files.

 

You have the following code:

 

clip_image014

 

Which code segments should you include in Target 1, Target 2 and Target 3 to implement the ExecuteResult method?

 

To answer, select the appropriate option or options in the answer area.

 

clip_image016

 

Correct Answer:

clip_image018

 

 

QUESTION 35

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?

 

A.

Enable Forms authentication

B.

Enable Windows authentication

C.

Generate server SSL certificates and install them in IIS

D.

Enable Digest authentication

 

Correct Answer: B

Explanation:

Requirements for Delegation

Delegation relies on Integrated Windows authentication to access resources. There is no limit on the number of computers that you can delegate your account — you must correctly configure each of them. The Integrated Windows authentication method works only if the following two conditions exist:

/ You set up your network to use the Kerberos authentication protocol that requires Active Directory.

/ You set up the computers and accounts on your network as trusted for delegation.

 

 

QUESTION 36

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?

A.

Azure Diagnostic infrastructure logs

B.

Windows event logs

C.

performance counters

D.

.NET EventSource

 

Correct Answer: D

Explanation:

Azure Diagnostics 1.2 and 1.3 are Azure extensions that enable you to collect diagnostic telemetry data from a worker role, web role, or virtual machine running in Azure.

Diagnostics 1.2 and 1.3 enable the collection of ETW and .NET EventSource events.

 

Example:

EtwProviders>

<EtwEventSourceProviderConfiguration provider=”SampleEventSourceWriter” scheduledTransferPeriod=”PT5M”>

<Event id=”1″ eventDestination=”EnumsTable”/>

<Event id=”2″ eventDestination=”MessageTable”/>

<Event id=”3″ eventDestination=”SetOtherTable”/>

<Event id=”4″ eventDestination=”HighFreqTable”/>

<DefaultEvents eventDestination=”DefaultTable” />

</EtwEventSourceProviderConfiguration>

</EtwProviders>

 

Reference:

Enabling Diagnostics in Azure Cloud Services and Virtual Machines

https://azure.microsoft.com/sv-se/documentation/articles/cloud-services-dotnet-diagnostics/

 

 

QUESTION 37

HOTSPOT

You are developing an ASP.NET MVC 4 application. You are using IntelliTrace to debug the application. You configure IntelliTrace as shown in the screenshot below.

 

clip_image019

 

To answer, make the appropriate selections in the answer area.

 

clip_image021

 

Correct Answer:

clip_image023

 

 

QUESTION 38

You are developing an ASP.NET MVC application.

 

The application must allow users to enter HTML in a feedback text box only.

 

You need to disable request validation.

 

What should you do?

 

A.

Use the HttpRequest.Form property to read the unvalidated form value.

B.

Apply and set the Validatelnput attribute on the controller action to FALSE.

C.

Use the HttpRequest.Unvalidated property to read the unvalidated form value.

D.

Apply and set the CausesValidation attribute on the controller action to FALSE.

 

Correct Answer: C

Explanation:

The HttpRequest.Unvalidated Property provides access to HTTP request values without triggering request validation.

 

 

QUESTION 39

DRAG DROP

You are developing an ASP.NET MVC application in a web farm. The application has a page that uploads a customer’s photo, resizes it, and then redirects the browser to a page where the new image is displayed along with the final dimensions.

 

The final dimensions should be available only to the page where the new image is displayed.

 

You need to store state and configure the application.

 

What should you do?

To answer, drag the appropriate item to the correct location. Each item 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.

 

clip_image025

 

Correct Answer:

clip_image027

 

 

QUESTION 40

DRAG DROP

You are developing an ASP.NET MVC application in Visual Studio 2012. The application contains sensitive bank account data.

 

The application contains a helper class named SensitiveData.Helpers.CustomEncryptor.

 

clip_image029

 

The application must not display AccountNumber in clear text in any URL.

 

You need to build the view for the GetAccounts action.

 

How should you build the view?

 

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.

 

clip_image031

 

Correct Answer:

clip_image033

 

Free VCE & PDF File for Microsoft 70-494 Actual Tests

Instant Access to Free VCE Files: MCSE|MCSA|MCITP…
Instant Access to Free PDF Files: MCSE|MCSA|MCITP…