[Mono-dev] [PATCH] Add HttpNotFoundHandler and HttpNotImplementedHandler
Kornél Pál
kornelpal at gmail.com
Mon Nov 2 03:29:43 EST 2009
Miguel de Icaza wrote:
> I am not sure why we would include in Mono two classes that are
> flagged as internal. How would a user even use this?
Handlers are mostly used in Web.config and the ASP.NET runtime uses
reflection that makes it able to instantiate non-public types. This way
users may not even realize that they are using internal types.
On the other hand if you want to hide or deny requests you can use just
like HttpForbiddenHandler but you can have additional HTTP status codes
and messages.
Of course you could duplicate this functionality in your own classes but
it's easier to use existing framework classes.
I just realized that Microsoft documented HttpForbiddenHandler that is
internal as well and is implemented in Mono:
http://msdn.microsoft.com/en-us/library/ms404282.aspx
Originally HttpForbiddenHandler was exposed only in Web.config.
HttpNotFoundHandler existed in 1.x but was not exposed in Web.config
until 2.0.
So people most likely know that these types exist and the might use
them. I actually wanted to use it when I found out that we haven't had it.
HttpNotImplementedHandler is not used in Web.config and is most likely
known by much less people but I found it in the prevously referenced
book so I just implemented that as well to make the internal simple
handler collection complete.
Kornél
More information about the Mono-devel-list
mailing list