Ensurepass

QUESTION 21

HOTSPOT

You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication.

 

The application must:

 

clip_image002Use Windows Identity Foundation 4.5.

clip_image002[1]Support the Windows Azure Access Control Service.

 

You need to implement authentication.

 

How should you build the class constructor?

 

To answer, select the appropriate option from the drop-down list in the answer area.

 

clip_image003

 

Correct Answer:

clip_image004

 

 

 

QUESTION 22

You are designing a distributed application that runs on the Microsoft Azure platform.

 

The application must store a small amount of insecure global information for all users 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.

 

A.

profile properties of the Microsoft Azure application

B.

Microsoft Azure session state

C.

SQL Database

D.

Microsoft Azure application state

 

Correct Answer: A

Explanation:

In many applications, you want to store and use information that is unique to a user. When a user visits your site, you can use the information you have stored to present the user with a personalized version of your Web application. Personalizing an application requires a number of elements: you must store the information using a unique user identifier, be able to recognize users when they visit again, and then fetch the user information as needed. To simplify your applications, you can use the ASP.NET profile feature, which can perform all of these tasks for you.

 

 

QUESTION 23

HOTSPOT

You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple cultures.

 

To set the culture, the application must use the AcceptLanguage header field value sent by the client browser.

 

You need to ensure that the application can set the culture.

 

You have the following markup in the web.config file:

 

clip_image006

 

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup?

 

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

 

clip_image008

 

Correct Answer:

clip_image010

 

 

 

 

 

 

 

 

 

 

 

QUESTION 24

You are developing an ASP.NET MVC application that provides instant messaging capabilities to customers.

 

You have the following requirements:

 

Messages must be able to be sent and received simultaneously. Latency and unnecessary header data must be eliminated. The application must comply with HTML5 standards.

 

You need to design the application to meet the requirements.

 

What should you do?

 

A.

Configure polling from the browser.

B.

Implement long-running HTTP requests.

C.

Implement WebSockets protocol on the client and the server.

D.

Instantiate a MessageChannel object on the client.

 

Correct Answer: D

 

 

QUESTION 25

You are developing an ASP.NET MVC application.

 

You need to authenticate clients by using an ASP.NET membership database.

 

Which authentication method should you implement?

 

A.

Kerberos

B.

Forms

C.

Basic

D.

Windows

 

Correct Answer: B

 

 

QUESTION 26

HOTSPOT

You develop an ASP.NET MVC application. The application includes a feature that allows users to reset their passwords. The feature is enabled by a ForgotPassword controller method and a corresponding Razor view.

 

You need to prevent Cross-Site Request Forgery (CSRF) attacks.

 

How should you complete the relevant code?

 

To answer, select the appropriate code segment from each list in the answer area.

 

clip_image011

 

Correct Answer:

clip_image012

 

 

QUESTION 27

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

 

A.

Windows Azure application state

B.

SQL Azure

C.

Profile properties of the Windows Azure application

D.

Windows Azure session state

 

Correct Answer: BD

Explanation:

SQL Database provides a relational database management system for Windows Azure and is based on SQL Server technology. With a SQL Database instance, you can easily provision and deploy relational database solutions to the cloud, and take advantage of a distributed data center that provides enterprise-class availability, scalability, and security with the benefits of built-in data protection and self-healing.

 

Session States in Windows Azure.

If you are a Web developer, you are probably very familiar with managing user state – that is you are familiar with tracking user activity and actions across several request-response exchanges that occur in Web applications. Since HTTP is a stateless protocol, developers over the years have developed all sorts of means to manage state. You’ll even find an MSDN page providing alternatives and recommendations for state management here. Cookies, hidden fields, and query strings are some client-side options to tracking user state. When it comes to managing that state on the server-side, most Web developers rely on session objects.

 

 

QUESTION 28

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?

 

A.

Mage.exe

B.

Ngen.exe

C.

ALexe

D.

Resgen.exe

 

Correct Answer: C

Explanation:

Al.exe generates a file with an assembly manifest from one or more files that are either resource files or Microsoft intermediate language (MSIL) files.

 

 

QUESTION 29

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

 

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.

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

<customErrors mode=”On” >

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

</customErrors>

B.

From the Debug menu in Visual Studio, 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.

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

 

Correct Answer: D

Explanation:

Configuring the debugger to break for first chance exceptions To change when the debugger breaks, go to Debug->Exceptions…

 

clip_image014

 

When you first open this window you will see that there is a tree grid with one column and checkboxes.

 

* Break when Thrown. This includes a default list of exceptions known by the debugger, grouped by category.

 

Note: The possible exceptions that could break from this list is determined by the runtime you are debugging. For example, if you are using managed-only debugging then the debugger will never break for C++, Win32 Exceptions, etc. even if they are configured to break when thrown.

 

* Checkboxes. If you check the box for a category, then the debugger will break for all First Chance Exceptions while debugging. If you don’t want to enable all First Chance Exceptions, you can find the specific exception types that you wish to configure by using the search box.

 

Reference:

Understanding Exceptions while debugging with Visual Studio

http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/08/understanding-exceptions-while-debugging-with-visual-studio.aspx

 

 

QUESTION 30

< font style="font-size: 10pt" color="#000000">You are developing an ASP.NET MVC web application that includes the following method.

 

clip_image016

 

You need to test the GoldMined method.

 

Which unit test should you use?

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

Free VCE & PDF File for Microsoft 70-494 Real Exam

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