I have a controller that retrieves images from a database, resizes, caches the result on disk and splashes the image as a result Content().
I recently added support for the "Scrape-buster" code on my site. That is, I take a hash of a unique code attached to each image plus some salt, and pass the first few characters of this hash to the user for confirmation during the search. This allows me to prevent people from scraping every image from the site. (Without logging in and scraping HTML, namely.)
In any case, if the code is ScrapeBusterincorrect, I would like to return a 404 error from my controller. Is there a built-in way to do this, or am I looking at creating a custom one ActionResult?
source
share