I have the following method in my Web Api controller:

TemplatesController.cs

// GET: api/Templates
[HttpGet]
public async Task<IActionResult> GetTemplate()
{
    ApplicationUser currentUser = await _userManager.GetUserAsync(HttpContext.User);
    IQueryable<Template> templates = from template in _context.Template
        where template.User.Id == currentUser.Id
        select template;

    return Ok(templates);
}

Which causes Chrome to throw an error ERR_INCOMPLETE_CHUNKED_ENCODING.

When I take out the WHERE clause, however, it works fine:

// GET: api/Templates
[HttpGet]
public async Task<IActionResult> GetTemplate()
{
    IQueryable<Template> templates = from template in _context.Template
        select template;

    return Ok(templates);
}

The ERR_INCOMPLETE_CHUNKED_ENCODING does not occur in Firefox or Edge, but the data fetch still fails silently.

Related posts

Recent Viewed