Re: httpHandlers



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



.



Relevant Pages

  • URL Rewriting using IHttpHandlerFactory
    ... the request is examined and ... My problem is is that the factory ... correct Handler.. ... The URL Rewriting should be able to take Root/Test/1.aspx and rewrite it ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: The right URL, server.transfer
    ... rewriting solution... ... contacted again and told to request the new page ... I'm afraid you'll need to re-think your solution. ... Sub Application_BeginRequest(ByVal sender As Object, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Newbie - Is there a PHP equivalent of Server.Transfer (in ASP.NET)
    ... stuff in PHP. ... request to a different page from the one that the user requested, ... No. Server.Transfer is IIS' way of doing URL rewriting. ...
    (comp.lang.php)
  • Re: Clean display URL on custom error redirect
    ... Okay, so are you Rewriting the path on begin request? ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Using RewritePath - but I want to send the user to a 404
    ... By simply not rewriting the URL this should happen. ... Which URL rewriting setup are you using? ... in the db and find the relevant product, and then do a rewritepath to ... I get a request for /products/someoddproduct.aspx which ...
    (microsoft.public.dotnet.framework.aspnet)

Loading