When i try to upload large files(>30Mb) to my server I get generic 404 error. But it does not allow me to render appropriate message("File too large") to make sure that user understands why upload fails. So is there a way to catch this error before IIS returns a 404 response back to the user and return a different header with a custom error?
Because right not the only way for me to know that this error was due to a file size is thru analyzing server logs for the failed requests.
If not, is there a way to access the maxAllowedContentLength
directive thru the controller to pass this value back to the ui so user can compare the content length before upload?