getcertified4sure.com

Ideas to 70 486 certification




Q31. - (Topic 4) 

You are developing an ASP.NET MVC web application that includes the following method. 

You need to test the AccountBalance method. Which unit test should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: 

http://msdn.microsoft.com/en-us/magazine/cc163665.aspx http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal(v=vs.110).aspx 


Q32. - (Topic 4) 

You are developing an ASP.NET MVC application that displays stock market information. 

The stock market information updates frequently and must be displayed in real-time. 

You need to eliminate unnecessary header data, minimize latency, and transmit data over 

a full-duplex connection. 

What should you do? 

A. Implement long-running HTTP requests. 

B. Instantiate a MessageChannel object on the client. 

C. Implement WebSockets protocol on the client and the server. 

D. Configure polling from the browser. 

Answer:


Q33. - (Topic 1) 

You need to add an action to RunLogController to validate the users' passwords. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q34. - (Topic 4) 

You are developing an ASP.NET MVC application that enables you to edit and save a 

student object. 

The application must not retrieve student objects on an HTTP POST request. 

You need to implement the controller. 

Which code segment should you use? (Each correct answer presents a complete solution. 

Choose all that apply.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: C,D 


Q35. - (Topic 4) 

You are authoring unit tests. 

The unit tests must test code that consumes sealed classes. 

You need to create, maintain, and inject dependencies in the unit tests. 

Which isolation method should you use? 

A. T4 text templates and code generation 

B. Stub types 

C. Shim types 

D. Hard-coded implementation 

Answer:

Explanation: http://msdn.microsoft.com/en-us/library/hh549176.aspx 

Shim types are one of two technologies that the Microsoft Fakes Framework uses to let you easily isolate components under test from the environment. Shims divert calls to specific methods to code that you write as part of your test. Many methods return different results dependent on external conditions, but a shim is under the control of your test and can return consistent results at every call. This makes your tests much easier to write. 


Q36. - (Topic 3) 

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.cs? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q37. DRAG DROP - (Topic 4) 

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

Answer: 


Q38. HOTSPOT - (Topic 4) 

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: 

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

Answer: 


Q39. HOTSPOT - (Topic 4) 

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. You have the following code: 

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. 

Answer: 


Q40. - (Topic 4) 

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> 

Answer: