Hi all,
What are the major considerations when considering Server.Transfer ?
I have some legacy apps (when I say legacy, I mean ASP.NET1.0) that use
Server.Transfer for almost everything. I always thought
Response.Redire ct was better because more of the items are GCed. So I
am rethinking about the importance of Server.Transfer usage. In the old
ASP days I seem to remember (I could be wrong) that when I did a
Server.Transfer , all objects on the old page were still available to be
accessed in the new page. However this doesn't seem to be the case in
..NET and indeed would seem somewhat contradictory to an OO paradigm.
So I guess I just want to know when to use Server.Transfer , and what
should I be considering about memory usage and GC and so on.
Many thanks,
Steven 5 3774
"Steven Nagy" <le*********@ho tmail.comwrote:
What are the major considerations when considering Server.Transfer ?
I have some legacy apps (when I say legacy, I mean ASP.NET1.0) that use
Server.Transfer for almost everything. I always thought
Response.Redire ct was better because more of the items are GCed.
The two have different semantics. Server.Transfer continues processing
on the server, but on a different URL on the server. Response.Redire ct
sends an HTTP redirect back to the client, and exits the server. The
client then reconnects on the new URL.
With Response.Redire ct, the client's URL changes. With Server.Transfer ,
it doesn't.
Your choice should be based on which semantics you need.
-- Barry
-- http://barrkel.blogspot.com/
So there's absolutely no other considerations?
Server.Transfer still GCs to the same extent as Response.Redire ct?
So Response.Redire ct is actually quite time consuming?
Since it sends a response back to the client telling it to request a
new page?
That's a whole extra round trip right?
In that case, why EVER use Response.Redire ct ?
Thanks,
Steven
"Steven Nagy" <le*********@ho tmail.comwrote:
So there's absolutely no other considerations?
Server.Transfer still GCs to the same extent as Response.Redire ct?
Garbage collection has nothing to do with it. With a redirect in a
load-balanced environment, the client might not even enter the same
server. Certainly, objects associated with the current request will no
longer be rooted and will be eligible for collection, since request
processing will cease and the request thread will exit back out to
ASP.NET.
So Response.Redire ct is actually quite time consuming?
Since it sends a response back to the client telling it to request a
new page?
That's a whole extra round trip right?
Yes.
In that case, why EVER use Response.Redire ct ?
When pages move? So that the target URL can be bookmarked? To transfer
control to a different website?
-- Barry
-- http://barrkel.blogspot.com/
Barry Kelly wrote:
"Steven Nagy" <le*********@ho tmail.comwrote:
>In that case, why EVER use Response.Redire ct ?
When pages move? So that the target URL can be bookmarked? To transfer
control to a different website?
....or my favorite - to make the browser to a GET after a POST so that the
back button works sensibly. Totally contrary to the ASP.NET POST-centric
model, but the user experience is so much better.
-cd
Ok thanks guys. I guess I need to use Server.Transfer a bit more then.
When none of those reasons you supplied are relevant, then
Server.Transfer is the way to go to save the round trip.
Thanks again peeps. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
by: Justin |
last post by:
Hi,
Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are the
proper usages of the two methods that seems working
similar..
The problem i faced while using Response.Redirect is that
the page that is directed to, does not looks as
desired..the textboxes are not visible anymore and so as
|
by: Harsh Thakur |
last post by:
Hi,
I'd like to know the performance related differences between
Response.Redirect and Server.Transfer.
I'd like to redirect the user to a different page.
I can either do a Response.Redirect("URL") or a Server.Transfer("URL").
So I'd like to find out which is more efficient/better.
Can anyone please tell me or give any pointers to links on the web?
Thanks & Regards
|
by: RayAll |
last post by:
I have used a response.redirect() in the first page of my weblog to transfer
it to anther page,but it seemes to be slow.Is there a workaround (probably
Server.Transfer???)???
Thanks
|
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
| |
by: Coleen |
last post by:
Hi all :-)
I need to redirect to multiple pages on click of a transmit button, without
redisplaying each page. This redirection is to capture session variables
that are created on each page and pass them to the main page to be
displayed. We are actually NOT using session variables, but storing the
values in a temporary table. The problem is that the values don't get
stored in the temporary table unless the user goes to each page...
|
by: Nathan Sokalski |
last post by:
The last two lines of code in the Click event of a Button Control on my page
are:
Me.WelcomeEmail()
Response.Redirect("mainmenu.aspx")
The last line of code in Me.WelcomeEmail() is:
|
by: RN1 |
last post by:
When a server encounters the line
Response.Redirect("abcd.asp")
in a ASP script, the server tells the browser that it has to be
redirected to another page (which is abcd.asp, in this case). The
browser then makes a new request to the server to redirect itself to
abcd.asp after which the user gets redirected to abcd.asp.
But in case of Server.Execute (or Server.Transfer), when the server
|
by: jasonheath.net |
last post by:
I apologize in advance for the length of this post. I wanted to get as
much detail as possible in here.
We have 1 web app that contains the functionality to do some single
sign-on logic. The flow is
1. Welcome page
2. Login Page (where the SSO actually occurs)
3. Welcome page
4. Default page
|
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,...
|
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...
| |
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...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |