473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1069

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: William Logan | last post by:
Hello all DBAs what is the best methodolgy to replace a server with a new server in a multiple sql server environment.. Is is using back up/restore to another/bridge type server then rename...
8
by: gh0st54 | last post by:
Hi I'm trying to post to Paypal to process payment I try a server.tranfer but I get the error : "System.ArgumentException: Invalid path for child request...
2
by: Russ | last post by:
Does server.transfer only works for pages that are in the root folder of an application? I tried some code that looked like this: Server.Tranfer("./Subfolder/Mypage.aspx"); Is it not...
3
by: srikirti | last post by:
I used the context object the following way to use server.transfer to pass the dat Context.Items.Add("SessionID",strSessionID) Server.Transfer("WebForm2.aspx") here strSessionID is public...
1
by: BrandonN | last post by:
I have 2 seperate web applications A and B. During the execution of A, I want to do a Server.Transfer to a page in application B. This works fine if A has a reference to B, but without the...
3
by: shahla.saeed | last post by:
hi, plzz check my code and let me know where the problem is lying...becuase whenever i try to tansfer the file of 573KB(mp3) it just tranfer few Kb of file(Somtimes 5.2Kb,somtimes 32Kb..every time...
2
by: bbawa1 | last post by:
I have a classic ASp Page at server. How Can I transfer the data from classic asp page from server to a Asp.net (aspx) page.copuld you please provide me coding
2
LeoTD
by: LeoTD | last post by:
Dear all, I have a problem: I want to execute some codes in page1 and return result in page2. In ASP, the Server.Transfer function is OK. But in PHP, i don't know have function could do it or not....
2
by: Dale Harris | last post by:
Hi, I was wondering, is there a difference between Server.Transfer and Response.Redirect? They seem to do the same thing. Or am I mistaken? TIA ** Posted from http://www.teranews.com **
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.