F
fabrice
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.CurrentExecutionFilePath "
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.
..... 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
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.CurrentExecutionFilePath "
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.
..... 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