473,769 Members | 6,653 Online
Bytes | Software Development & Data Engineering Community
+ 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.transfe r" property to go to one page
to another one.

In this process, I use the global.asax with Application_Beg inRequest Sub.
I need to catch the whole url with querystring if exists.
First, I have used the property : HttpContext.Cur rent.request.Ra wUrl.

--> I can't use " HttpContext.Cur rent.Request.Cu rrentExecutionF ilePath "
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.Cur rent.Request.Cu rrentExecutionF ilePath property
in a SUB LOAD .aspx page, i get the right path. But not the queryString. If I use HttpContext.Cur rent.Request.Cu rrentExecutionF ilePath in
Application_Beg inRequest Sub, I get the old url page.
If I use HttpContext.Cur rent.request.Ra wUrl in Application_Beg inRequest
(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_Beg inRequest 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_Beg inRequest ) with querystring (if querystring
exists) by using server.transfer in my website.

Thanks a lot for your help.

fabrice
Feb 3 '06 #1
0 1088

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

Similar topics

4
417
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 servers or is it to bring in new server then tranfer the datafiles. Does tranfering the data files include logins and jobs ?? Or is ther a better way that I have not realised? Bill
8
16378
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 'https://www.paypal.com/cgi-bin/webscr'. A virtual path is expected." how can I post to paypal for processing ?
2
278
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 possible to transfer to a file in another folder?
3
2461
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 strin once Server.Transfer is called it is throwing this erro ErrorSystem.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort() at System.Threading.Thread.Abort(Object...
1
1904
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 reference, I get the following error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
3
11041
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 i run the program).....but when i watch the transfering of bytes by debuging it.(RED dot on while(nfs.CanRead) )..it shows that complete bytes are transfered.(in my case i-e 573Kb)....i am unable to understand whats going wrong in my program....
2
1048
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
1298
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. Please help me!! Thanks a lot :D
2
1513
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
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3565
muto222
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.