Chapter 13 - HAL Browser Update
I typed and ran the REST API example in chapter 13 using the current version of the HAL browser. It seems that this version sets the useCredentials property to true when making its AJAX requests. So, to make the example work, I had to configure CORS on the Accounts API to support credentials, and then set the allowed origins to be the URL of the EntryPoint API (because the CORS specification won't allow a wildcard in this scenario).
To make the example work with the latest HAL browser, go to the following line of code in the Register method of WebApiConfig.cs in the Accounts API project:
var cors = new EnableCorsAttribute("*", "*", "*");
and replace this line with the following two lines of code:
var cors = new EnableCorsAttribute("http://localhost:4100", "*", "*");
cors.SupportsCredentials = true;
This should produce the same results as the code sample in the book.
Thank you very much,