Returning ObjectResult results in 406 Not Acceptable
问题 While following along with Scott Allen's Pluralsight course, "Asp.net Core 1.0 Fundamentals", in the "Controllers in the MVC Framework" module and "Action Results" section I ran into a 406 Not Acceptable error on my Index action method that returned an ObjectResult with a model object. 回答1: This blog post led me to making a reference to the IMvcCoreBuilder and adding the JSON formatter as follows: public void ConfigureServices(IServiceCollection services) { var mvcCore = services.AddMvcCore()