Re: httpHandlers
- From: "Kevin Spencer" <unclechutney@xxxxxxxxxxxx>
- Date: Tue, 2 Oct 2007 06:51:30 -0400
Your custom HttpHandler should use a different file extension than "aspx."
It is the extension that identifies the handler to the web server.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Manso" <Manso@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D3351C8D-F38E-4D8C-A38E-030B039B908D@xxxxxxxxxxxxxxxx
Hi John,
Thanks for your prompt reply.
We are only rewriting URLs with aspx extensions e.g.
www.site.com/products/category1/My-item1.aspx
will be rewritten as
www.site.com/products.aspx?item=My-item1&cat=category1
This means we have to react to all aspx-request. We check to see if the
file
physically exists and skipped it if it did so existing pages (such as
product.aspx in the example above) would execute as normal.
Problem with HttpHandler is that they don't exist in the file system and
in
our application we won't be able to tell whether it's a httpHandler or a
"normal" request that needs to be rewritten. We somehow need to be able to
identfy this as a call to a handler. Third party apps can register
themselves
as handlers ("getfile.aspx", "makereservation.aspx" etc).
Thanks,
- Manso
"John Timney (MVP)" wrote:
Might be one of those odd suggestions - but have you tried to just check
the
request extension and drop through your handler if its missing or has an
..aspx extension?
Regards
John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Manso" <Manso@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4D0B235D-78B2-4CD7-9B2D-A752081A57EB@xxxxxxxxxxxxxxxx
Hi,
We are doing custom request rewriting in a httpModule in
Application.AuthenticateRequest for requests coming in with .aspx using
HttpContext.RewritePath().
We are having a problem identifying requests that come in from
registered
httpHandlers i.e. handlers with extension .aspx. These should just fall
through and not be analyzed/rewritten. Is there a way (flag?) that
identifies
a request as a request to a handler? The Context.CurrentHandler is not
yet
set this early.
We could always read the configuration data but since handlers can be
added
further down in the config hierarchy we cannot cache it and it seems
like
a
costly operation.
Grateful for any ideas.
Thanks,
Manso
.
- Follow-Ups:
- Re: httpHandlers
- From: Manso
- Re: httpHandlers
- References:
- Re: httpHandlers
- From: John Timney \(MVP\)
- Re: httpHandlers
- From: Manso
- Re: httpHandlers
- Prev by Date: check property exists in template control
- Next by Date: Re: httpHandlers
- Previous by thread: Re: httpHandlers
- Next by thread: Re: httpHandlers
- Index(es):
Relevant Pages
|
|