[Mono-list] asp.net and apache

Peter Hagen peter at willow-media.nl
Thu May 31 14:10:25 UTC 2012


Does anybody know how to decline the web request (from a HttpModule) so
Apache will go on to the next handler? I figured out that DECLINE in
Apache is status code -1, but if I return that, I get the following

This webpage is not found
No webpage was found for the web
address: http://dev.willow-media.nl/photo/21345/IMG_4470.jpg
Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be

The code that tries to set the DECLINE is as followed:

	app.Response.StatusCode = -1;
	app.Response.ContentType = "application/x-asp-net";
	app.CompleteRequest ();

The idea is, that a HttpModule checks the request, and if the request is
ok, it should decline the request, so Apache will handle the file like
normal. With images, this would speed up the download quite allot. Also,
with this I could make authenticated images. If the authentication
fails, the module will return 401, else apache will return the image.

Anyone any idea about this?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20120531/fc0dd467/attachment.html>

More information about the Mono-list mailing list