For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > December 2004 > Re: how to transfer a request to a different page in IHttpModule (isap









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: how to transfer a request to a different page in IHttpModule (isap
daberelay@gmail.com

2004-12-30, 3:59 pm

Hey there,
Thanks for the lead but it is suggesting using a workarround for asp
instead of ihttpmodule, and moreover it offers using the redirect
function instead of the server.transfer function. it's of no use to me
as i would like to change the response output without going to the
client machine.

DaberElay.

John Saunders

2004-12-30, 3:59 pm

<daberelay@gmail.com> wrote in message
news:1104418162.950319.138230@z14g2000cwz.googlegroups.com...
> Hey there,
> Thanks for the lead but it is suggesting using a workarround for asp
> instead of ihttpmodule, and moreover it offers using the redirect
> function instead of the server.transfer function. it's of no use to me
> as i would like to change the response output without going to the
> client machine.


I was not offering it as a workaround. I was offering it as a diagnostic
technique.

John Saunders


John Saunders

2004-12-30, 3:59 pm

<daberelay@gmail.com> wrote in message
news:1104419522.871855.244360@z14g2000cwz.googlegroups.com...
> Sorry John,
> I think there was a confusion here, the workarround line i wrote was
> reffering another answer i got from George a. beamer...
>
> as per your answer, i know redirect works (and anyhows i did it again
> just to verify), because redirect doesn't touch the source of the
> problem. redirect asks the client's browser to change it's request and
> send it again...
> the transfer function trys to do it without ever leaving the server
> side.
>
> as for the Context.Handler, its <undefined value> ( i.e. null reference
> ), what can we understand from this ? is there something i need to
> instanciate first ?
> Your concern is correct, there is nothing to transfer from just yet,
> simply because the original request was for a page that doesn't exist.
> Thanks for the responsiveness!


I no longer recall the details of the original problem, but I know became
concerned because I suspected that Context.Handler would be null. I'm
frankly surprised that Server.Transfer works at all.

Have you looked into Url Rewriting using Context.RewritePath? I have used it
successfully in a similar situation.

John Saunders


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com