views:

95

answers:

3

Hello,

I'm making a request for a page (lets call it page A). However, the request gets redirected to another page (page B). As soon as the request handling starts, URL property of Request object on the server points to page B (however, RawURL still points to page A).

I am not able to find any piece of code in the applications that explicitly redirects anything to page B. I guess it happens during some request preprocessing by asp.net, but I don't know what's actually happening behind the scene.

So I need an advice on how to continue debugging this issue :)

Thanks!

+1  A: 

This sounds like a Server.Transfer, might want to search the code base for that.

http://msdn.microsoft.com/en-us/library/ms525800.aspx
http://www.developer.com/net/asp/article.php/3299641

brendan
A: 

Thanks for the reply.

I can actually find two places on which Server.Transfer to page B is used, but apparently, that code is not being executed.

A: 

I would put a breakpoint on the page that calls the problem page and see at which point control is passed over to Page B.

Also, you can easily see if the redirection is using Response.Redirect or Server.Transfer by viewing the http headers sent. A Response.Redirect sends a 302 redirect header to the client, while Server.Transfer doesn't.

CB