as a side note - i guess in nearly all cases it is also more
appropriate to
use HttpNotFoundHandler -
at least for security reasons it is better to return a
generic "not found"
as opposed to "found - but are not allowed to access
it - maybe you find
another way"
if you want to be on the safe side - the handlers are very
straightforward
and just return an http error...
public class NotFoundHandler : IHttpHandler
{
public bool IsReusable
{
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
throw new HttpException(404, context.Request.Path +
" not found");
}
}
cheers,
dominick
-----------------------------
Dominick Baier, DevelopMentor
http://www.leastprivile
ge.com
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Shawn Wildermuth
Sent: Sonntag, 16. April 2006 22:09
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] Handlers not Documented?
I am after whether suggesting that clients use them in
specific situations
is going to cause problems. I hate to recommend stuff in
the .NET Framework
that isn't documented, though using the
HttpForbiddenHandler seems inoquious
enough I just want to know what they are supposed to expect
from the handler
(and what other handlers I haven't accidently come across
that would be of
use).
Thanks,
Shawn Wildermuth
http://adoguy.com
C# MVP, MCSD.NET, Author and Speaker
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Brad Wilson
Sent: Sunday, April 16, 2006 11:57 AM
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] Handlers not Documented?
Out of curiosity, what is it you're after? The name tells
you what it does.
The doc probably wouldn't tell you how. Is the problem the
low level of
discoverability? (If so, then the less than ideal answer is
Reflector.)
On 4/15/06, Shawn Wildermuth <swildermuth_lists adoguy.com> wrote:
>
> But if you can specify them in the Web.config (like it
does in
> X:\windows\microsoft.net) or in your own web.config,
shouldn't it be
> documented? (e.g.:
>
--
Brad Wilson
http://www.
agileprogrammer.com/dotnetguy/
"You've been schooled, had aggression in large
amounts Just be truthful,
man, it's everything that counts There is no hand waiting
that must be paid
We will leave our encores all unplayed At the end of the
day" - Spock's
Beard
===================================
This list is hosted by DevelopMentor. http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|