473,657 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server.Transfer chaging URL in address bar

I have an ASP.Net 1.1 site that uses Server.Transfer () heavily. Specifically,
I use a page called /misc/pagenotfound.as px to implement logic that maps URLs
of the format /vdir/california to a physical page, called with the format
/vdir/state.aspx?id=C A. The first of these URLs can be used to call up the
page by the visitors. Because this page doesn't exist PageNotFound.as px is
loaded (I have configured this in web.config), which uses Server.Transfer to
invoke the state.aspx page (the physical page on my server). Here's the
important part - the address bar in the browser still displays
/vdir/california so all this plumbing is hidden to the visitor. That's
exactly what I want.

However, now that I am using the same page on an ASP.Net 2.0 site I am
seeing a different behaviour. The state.aspx file is still called and the
correct content (based on id=ca) is displayed. However, the address bar
displays the URL to PageNotFound. aspx - /vdir/california is not displayed.

How can I ensure that the actually URL used by the visitor remains in the
address bar, even when Server.Transfer is used?

Thanks.
May 28 '07 #1
3 1710
It sounds, to me, like you are throwing an error and the error is sending
the person to the "not found" page. Is that a possibility in the coding of
your application?

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

*************** *************** *************** ***
Think outside the box!
*************** *************** *************** ***
"Mark" <Ma**@discussio ns.microsoft.co mwrote in message
news:46******** *************** ***********@mic rosoft.com...
>I have an ASP.Net 1.1 site that uses Server.Transfer () heavily.
Specifically ,
I use a page called /misc/pagenotfound.as px to implement logic that maps
URLs
of the format /vdir/california to a physical page, called with the format
/vdir/state.aspx?id=C A. The first of these URLs can be used to call up the
page by the visitors. Because this page doesn't exist PageNotFound.as px is
loaded (I have configured this in web.config), which uses Server.Transfer
to
invoke the state.aspx page (the physical page on my server). Here's the
important part - the address bar in the browser still displays
/vdir/california so all this plumbing is hidden to the visitor. That's
exactly what I want.

However, now that I am using the same page on an ASP.Net 2.0 site I am
seeing a different behaviour. The state.aspx file is still called and the
correct content (based on id=ca) is displayed. However, the address bar
displays the URL to PageNotFound. aspx - /vdir/california is not
displayed.

How can I ensure that the actually URL used by the visitor remains in the
address bar, even when Server.Transfer is used?

Thanks.

May 29 '07 #2
Actually, yes, but that is by design. I have configured the defaultRedirect
element in eb.config and the page I have entered is being called for all
errors, as hoped. The codebehind for the pagenotfound.as px file then kicks in
to parse the original URL to map it to the physical URL. This all seems to be
working just fine because the correct page is being displayed. The "only"
problem I have is that the original URL entered should remain in the browsers
address bar but, instead, I am seeing a reference to pagenotfound.as px.

So, to sum this up, the only error is the regular 404 (page not found) I am
anticipating and coding for. But I can't stop the pagenotfound.as px file
showing up in the address bar.

Thanks.

Mark

"Cowboy (Gregory A. Beamer)" wrote:
It sounds, to me, like you are throwing an error and the error is sending
the person to the "not found" page. Is that a possibility in the coding of
your application?

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

*************** *************** *************** ***
Think outside the box!
*************** *************** *************** ***
"Mark" <Ma**@discussio ns.microsoft.co mwrote in message
news:46******** *************** ***********@mic rosoft.com...
I have an ASP.Net 1.1 site that uses Server.Transfer () heavily.
Specifically,
I use a page called /misc/pagenotfound.as px to implement logic that maps
URLs
of the format /vdir/california to a physical page, called with the format
/vdir/state.aspx?id=C A. The first of these URLs can be used to call up the
page by the visitors. Because this page doesn't exist PageNotFound.as px is
loaded (I have configured this in web.config), which uses Server.Transfer
to
invoke the state.aspx page (the physical page on my server). Here's the
important part - the address bar in the browser still displays
/vdir/california so all this plumbing is hidden to the visitor. That's
exactly what I want.

However, now that I am using the same page on an ASP.Net 2.0 site I am
seeing a different behaviour. The state.aspx file is still called and the
correct content (based on id=ca) is displayed. However, the address bar
displays the URL to PageNotFound. aspx - /vdir/california is not
displayed.

How can I ensure that the actually URL used by the visitor remains in the
address bar, even when Server.Transfer is used?

Thanks.


May 29 '07 #3
I should clarify what I meant here. There is no "intentiona l" (coded)
throwing of errors happening here. The only error involved is a 404 (Page Not
Found) and my entry in web.config is there to tell the system how to handle
that event. As I mentioned in the open message here, all the plumbing seems
to be in place because I do see the correct content, as parsed/redirected by
my pagenotfound.as px file. The problem I have is that the address bar shows
as follows:

http://<site>/misc/pagenotfound.as px?aspxerrorpat h=/articles/songs.aspx

What I expect to see in the address bar is:

http://<site>/articles/songs.aspx

which is what happens on my ASP.Net 1.1 site.

Any ideas?

Thanks.
"Mark" wrote:
Actually, yes, but that is by design. I have configured the defaultRedirect
element in eb.config and the page I have entered is being called for all
errors, as hoped. The codebehind for the pagenotfound.as px file then kicks in
to parse the original URL to map it to the physical URL. This all seems to be
working just fine because the correct page is being displayed. The "only"
problem I have is that the original URL entered should remain in the browsers
address bar but, instead, I am seeing a reference to pagenotfound.as px.

So, to sum this up, the only error is the regular 404 (page not found) I am
anticipating and coding for. But I can't stop the pagenotfound.as px file
showing up in the address bar.

Thanks.

Mark

"Cowboy (Gregory A. Beamer)" wrote:
It sounds, to me, like you are throwing an error and the error is sending
the person to the "not found" page. Is that a possibility in the coding of
your application?

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

*************** *************** *************** ***
Think outside the box!
*************** *************** *************** ***
"Mark" <Ma**@discussio ns.microsoft.co mwrote in message
news:46******** *************** ***********@mic rosoft.com...
>I have an ASP.Net 1.1 site that uses Server.Transfer () heavily.
>Specifically ,
I use a page called /misc/pagenotfound.as px to implement logic that maps
URLs
of the format /vdir/california to a physical page, called with the format
/vdir/state.aspx?id=C A. The first of these URLs can be used to call up the
page by the visitors. Because this page doesn't exist PageNotFound.as px is
loaded (I have configured this in web.config), which uses Server.Transfer
to
invoke the state.aspx page (the physical page on my server). Here's the
important part - the address bar in the browser still displays
/vdir/california so all this plumbing is hidden to the visitor. That's
exactly what I want.
>
However, now that I am using the same page on an ASP.Net 2.0 site I am
seeing a different behaviour. The state.aspx file is still called and the
correct content (based on id=ca) is displayed. However, the address bar
displays the URL to PageNotFound. aspx - /vdir/california is not
displayed.
>
How can I ensure that the actually URL used by the visitor remains in the
address bar, even when Server.Transfer is used?
>
Thanks.
May 29 '07 #4

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

Similar topics

6
4553
by: \A_Michigan_User\ | last post by:
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors? 1. Client-side VBscript code: call navigate("\\209.11.22.33\MyDir") 2. Client-side VBscript code: location.href ="\\209.11.22.33\MyDir" 3. Typing "\\209.11.22.33\MyDir" into my ie6 browser. 4. Typing "\\209.11.22.33\MyDir" into my Windows Explorer. 5. Server-side ASP: server.transfer "\\209.11.22.33\MyDir" 6. Server-side ASP: response.redirect...
4
4879
by: Bob H | last post by:
Hi, I'm aware of the different ways to pass variables between ASP.Net pages. For pages that need to pass a variable, we're using the server.transfer method. For others, we're using repsonse.redirect. My understanding was that the server.transfer method doesn't update the URL address bar. However, I've a situation that I'm a bit confused about and would appreciate any advice on why the following is occuring (i.e. why I'm obviously missing...
4
1768
by: john | last post by:
I have an app that uses Server.Transfer from page1 to page2. page2 needs to be able to read all the values from page1's form. The problem is, if the user clicks the back button on page2 after a Server.Transfer, the user gets a page has expired error. Is there a way to keep using Server.Transfer, but also have the back button work normally?
2
1786
by: Ryu | last post by:
Hi, it seems that Server.Transfer only preserve the url only for 1 hop. For example I have A.aspx, B.aspx and C.aspx. If i do a server.transfer at A.aspx to B.aspx Server.Transfer("B.aspx") the URL at B.aspx will be "A.aspx". However if I Server.Transfer("C.aspx") from B.aspx, my URL will be changed to B.aspx instead of A.aspx. Is this suppose to happen or did I forgot to turn on something?
3
5499
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan Silver
3
1134
by: qqq | last post by:
In a web app. I have a 'master' form (EventDetail.aspx) which displays existing bookings for an event. If the user clicks on a booking they are taken (with a server.transfer) to Booking.aspx which displays the details and lets them modify. I notice that when the Booking.aspx form is displayed, the browser address bar still shows the address of the previous form? - huh? After the user submits changes to Booking.aspx I do a server.transfer...
8
3888
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really need to avoid the extra round-trip to the client. I've tried Passing the page name, the full URL, and the instance of the handler class to the Transfer method, but everything gets me the same error 500. Any help would be appreciated.
8
1821
by: p3t3r | last post by:
I am using .NET2 and have a number of aspx pages. On each page is a LinkButton that performs a server.transfer() to another page. If we use page names A,B,C,D,E as an example. I start on page A and do a server.transfer to page B. The address bar still shows page A (which is what I want). Page B then does a server.transfer to page C. Now the address bar shows the URL for page B (not C and not A which is what I want). Every new...
5
1629
by: JX | last post by:
Is it possible to replace the address in client browser for server.transfer with the the real location?
0
8397
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
8732
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
8503
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
8605
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
7333
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
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();...
1
2731
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 we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.