Errata: May 24, 2021

Thank you for purchasing ASP.NET Core in Action, Second Edition. Please post errata not listed below in this book's LiveBook Errata thread. We'll update this list as necessary. Corrections are made to all formats during the book's second printing. Thank you!



In chapter 2, page 43, section 2.7:

The top left annotation in figure 2.10 should be: "The IHost is created in Program using the builder pattern, and the CreateDefaultBuilder and ConfigureWebHostDefaults helper methods."

In chapter 2, page 56, section 2.8.2:

In figure 2.16, the arrow to the top-right of the routing middleware block is pointing the wrong direction. It should be pointing top to bottom.

In chapter 9, page 266, section 9.2:

The Tip lists status codes in the wrong order. It should be "(400, 200, and 404, respectively)"

In chapter 11, page 357, section 11.5.2:

Listing 11.15 is using the wrong variable name. Instead of using builder, it should be:

config.AddUserSecrets();

In chapter 13, page 422, section: 13.2.2:

The final paragraph on the page refers to the wrong class. It should be: The Controller base class implements IActionFilter and IAsyncActionFilter itself.

In chapter 13, page 422, section: 13.2.2:

The title for listing 13.14 refers to the wrong class. It should be Overriding action filter methods directly on Controller.

In chapter 13, page 422, section: 13.2.2:

Listing 13.14 derives from the wrong base class. It should be

public class HomeController : Controller

In chapter 13, page 422, section: 13.2.2:

Listing 13.14 refers to the wrong base class in the first annotation. It should be: Derives from the Controller class.

In chapter 13, page 423, section: 13.2.2:

The first paragraph refers to the wrong base class. It should be: The OnActionExecuting Controller method runs before any other action filters.

In chapter 17, page 549, section: 17.2.1:

Figure 17.5 has a typo in the second annotation. It should be: Unhandled errors and exceptions that don't affect other requests.

In chapter 22, page 697, section 22.2:

The caption for figure 22.2 lists "configuration" twice. It should be "IHost provides features such as configuration, dependency injection, and logging",

In chapter 23, page 747, section 23.6:

Listing 23.19 is missing a using statement in the first line of the test method. It should be:

using var connection = new SqliteConnection("DataSource=:memory:");