I've got an MVC3 website that allows users to upload images. If a user tries uploading an image that is greater than the allowed value in my web.config, they are given a 404 response. I'm using a FileUpload control. The user is getting 404 response when they submit the form and the file is too large.
Here is an article discussing how to fix the problem, but it only explains how to increase the max size of the file. I don't want to increase the size, but rather give the user a friendly message when they do.
I'd like to intercept this response before it returns, so I can give them a friendly message explaining why they can't upload the file.
Is this possible?