I am getting HTTP 404 when I call an api method. The request is over 30MB in size. When I call the same api method with smaller data, the method processes successfully. The only difference is the size of the request.
Since the default request size is now ~ 30MB in ASP.NET Core 2.0 (https://github.com/aspnet/Announcements/issues/267) I tried setting the attribute RequestSizeLimit
to 100MB, but I am still getting the error even with this attribute.
[HttpPost("validate")]
[RequestSizeLimit(100000000)]
public List<XmlValidationError> Validate([FromBody]XmlDocumentDto order)
{
...
}
I trie also setting [DisableRequestSizeLimit]
on the method but it did not help.
How can the maximum request size be set?
Strangely, the 404 is also accompanied with a CORS error: