I am using the latest version of VS2019 and created a new ASP.NET Core Web API project (net5.0). I am very new to ASP.NET Core so please bear with me.
I have created an api controller and a get method that works fine for smaller payloads (5K json objects). However, I have a few larger payloads that return 40K+ json objects; which gives this message in the browser:
This localhost page can't be found
No webpage was found for the web address: https://localhost:5001/VpmGps/1
HTTP ERROR 404
Reading through the docs/issues here I saw some suggestions for adding DisableRequestSize
to the api method. I tried that (and a few other things) but get the same message in the browser.
Here is the api method:
[HttpGet("id")]
[DisableRequestSizeLimit]
[RequestFormLimits(MultipartBodyLengthLimit = Int32.MaxValue)]
public async Task<List<VPMPoint>> Get(int id)
{
try
{
var data = await _dataService.GetVPMPointsAsync(id);
return data;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
throw;
}
}
Any suggestions as to what else I can try?