Errata

Exam Ref 70-486: Developing ASP.NET MVC 4 Web Applications

Errata for Exam Ref 70-486: Developing ASP.NET MVC 4 Web Applications

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed, PDF, ePub
Page 171-172
bottom of 171, middle and bottom of 172

The "public" keyword is capitalized in several code snippets in chapter 3, section 3. These should be lower-case.

ex: "Public ActionResult Login(LoginUser user)"
should be "public ActionResult Login(LoginUser user)"

Note from the Author or Editor:
The code snippets should have public without the capital letter.

Andrew  Nov 19, 2013  Dec 13, 2013
PDF, Other Digital Version
Page 30
2nd question

I think that the answer for the following question is wrong:

"How could you traditionally consume an ASMX web service from your application?
(Choose all that apply.)
A. Generate a proxy by selecting Add Reference In Visual Studio.
B. Create an HttpService and connect using Get(URL).
C. Generate a proxy by selecting Add A Service Reference in Visual Studio.
D. Create a WCF proxy class."

The correct answers suggested by the book is: B, C

but B is actually incorrect (HttpService.Get gets the output of a REST service.) because the question was not related to a RESTfull web service but to a classic ASMX web service.

Also D is a valid answer too.

Note from the Author or Editor:
Answers for Objective 1.2 question 2 incorrectly state
2. Correct answers: B, C
Should be : Correct answer: B

Madalina Buzatu  Oct 31, 2013  Dec 13, 2013
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 193
3rd paragraph

Registering the model binder is not clear. The type of model used when registering the modelbinder should be the model you will be binding to, not the type of the the binder iteself.

The correct code should be:

ModelBinders.Binders.Add(typeof(MyNewModel), new MyNewModelBinder ());

Also, I think the book should note that the model binder to be used can be specified as an attribute of the Action parameter:

public ActionResult Index( [ModelBinder(typeof(MyNewModelBinder))] MyNewModel model) {

Note from the Author or Editor:
The code example on Page 193 is incorrectly stated as
ModelBinders.Binders.Add(typeof(MyNewModelBinder), new MyNewModelBinder ());
The correct code is ModelBinders.Binders.Add(typeof(MyNewModel), new MyNewModelBinder ());

Simon C  Oct 07, 2013  Dec 13, 2013
PDF
Page 197
Question 2, Options B & C

Multiple choice question 2 in the objective review for chapter 3.6 contains errors. Options A & B appear to be the same, and Option C appears to contain part of the answer that should be option B. This is based on the comments regarding each option in the answers section.

I believe the correct language should be:

A. Create a globally applied custom action filter that implements the OnActionExecuting method. Have it store the user, the URL, and the forms collection.

B. Create a globally applied custom action filter that implements the OnActionExecuting method. Set the AllowMultiple parameter to false in the filter. Have it store the user, the URL, and the forms collection.

C. Create a globally applied custom action filter that implements the OnActionExecuted method. Have it store the user, the URL, and the forms collection.

D. Override the AuthorizeAttribute and have it store the user, the URL, and the forms collection.

Note from the Author or Editor:
2. You work for a financial services company that deals with many small brokers. Your executives want to be able to run a report that details all the actions taken by the brokers on the site as a form of auditing and protection. Neither the application nor system currently stores this kind of information. Which of the following are viable solutions? (Choose all that apply.)
A. Create a globally applied custom action filter that implements the OnActionExecuting method. Have it store the user, the URL, and the forms collection.
B. Create a globally applied custom action filter, ensuring that you set the AllowMultiple parameter to false, that implements the OnActionExecuting method. Have it store the user, the URL, and the forms collection.
C. Create a globally applied custom action filter that implements the OnActionExecuted method. Have it store the user, the URL, and the forms collection.
D. Override the AuthorizeAttribute and have it store the user, the URL, and the forms collection.

Simon C  Oct 07, 2013  Dec 13, 2013