On Wed, 24 Aug 2005 10:29:55 +0100, "Steven Burn"
<so*******@in-time.invalid> wrote:
http://aspfaq.com/show.asp?id=2162
Sorry if I wasn't clear, but that's the opposite of what I was looking for.
I have an ASP already processing the request, so there is no real 404
condition.
The page is used only to accept POST requests (if all is OK, it sends back
nothing but a "204 No Data" status code; errors result in something else).
What I want is to simulate (or force) a standard 404 if the request is not
accepted (someone trying to 'GET' it, or faking a POST request without
knowing exactly what to put in).
In the end, the ASP is not supposed to be called from a browser at all.
At the other end there's an application POST-ing information that the ASP
stores in a database, that's all.
FWIW, the application is part of an automated update system for unattended
machines spread all over the country. This part checks free disk space and
some other parameters, and posts the info to a central location where
alerts are triggered if maintenance seems necessary somewhere.
Generating the 404 isn't important to the system's workings, I just wanted
to present prying eyes with a clear "there's nothing here for you" sign
that can't be distinguished from *really* hitting a 404 on the same server.