468,249 Members | 1,512 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

UrlRewrintg and Server.Tranfer

Hello,

I have got a little problem with Url Rewritig process and server.transfer
use.
I would like to create a simple url rewriting process for my web site
I use in a lot of pages, the "server.transfer" property to go to one page
to another one.

In this process, I use the global.asax with Application_BeginRequest Sub.
I need to catch the whole url with querystring if exists.
First, I have used the property : HttpContext.Current.request.RawUrl.

--> I can't use " HttpContext.Current.Request.CurrentExecutionFilePa th "
because there is not the querystring.

But, my problem, by using server.transfer property is that I get always the
old page url. And my Url Rewriting process doesn't work fine.

If I use HttpContext.Current.Request.CurrentExecutionFilePa th property
in a SUB LOAD .aspx page, i get the right path. But not the queryString. If I use HttpContext.Current.Request.CurrentExecutionFilePa th in
Application_BeginRequest Sub, I get the old url page.
If I use HttpContext.Current.request.RawUrl in Application_BeginRequest
(or in SUB LOAD .aspx page), I get the querystring but the old page url.


..... I don't know how to solve my problem.
Example

First URL
http://test.intranet.com/file1/page1.aspx

Request Path gives me file1/page1.aspx
In my application the user cliks on a button and Server.Transfer occurs.
There is a transfer to the new page " /file2/page2.aspx

But with Application_BeginRequest in global.asax, "Request Path" gives me
always file1/page1.aspx and not file2/page3.aspx
I get the old URL.

There is a way to get the right URL for Url Rewriting process (using
global.asax and Application_BeginRequest ) with querystring (if querystring
exists) by using server.transfer in my website.

Thanks a lot for your help.

fabrice
Feb 3 '06 #1
0 931

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Russ | last post: by
3 posts views Thread by srikirti | last post: by
1 post views Thread by BrandonN | last post: by
2 posts views Thread by bbawa1 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.