From "patterns & practices - Improving ASP.NET Performance"
http://www.msdn.microsoft.com/asp.net/archive/default.aspx?pull=/library/en-us/dnpag/html/scalenetchapt06.asp
Reduce Round Trips
Use the following techniques and features in ASP.NET to minimize the number
of round trips between a Web server and a browser, and between a Web server
and a downstream system:
a.. HttpResponse.IsClientConnected. Consider using the
HttpResponse.IsClientConnected property to verify if the client is still
connected before processing a request and performing expensive server-side
operations. However, this call may need to go out of process on IIS 5.0 and
can be very expensive. If you use it, measure whether it actually benefits
your scenario.
b.. Caching. If your application is fetching, transforming, and rendering
data that is static or nearly static, you can avoid redundant hits by using
caching.
c.. Output buffering. Reduce roundtrips when possible by buffering your
output. This approach batches work on the server and avoids chatty
communication with the client. The downside is that the client does not see
any rendering of the page until it is complete. You can use the
Response.Flush method. This method sends output up to that point to the
client. Note that clients that connect over slow networks where buffering is
turned off, affect the response time of your server. The response time of
your server is affected because your server needs to wait for
acknowledgements from the client. The acknowledgements from the client occur
after the client receives all the content from the server.
d.. Server.Transfer. Where possible, use the Server.Transfer method
instead of the Response.Redirect method. Response.Redirect sends a response
header to the client that causes the client to send a new request to the
redirected server by using the new URL. Server.Transfer avoids this level of
indirection by simply making a server-side call.
You cannot always just replace Response.Redirect calls with
Server.Transfer calls because Server.Transfer uses a new handler during the
handler phase of request processing. If you need authentication and
authorization checks during redirection, use Response.Redirect instead of
Server.Transfer because the two mechanisms are not equivalent. When you use
Response.Redirect, ensure you use the overloaded method that accepts a
Boolean second parameter, and pass a value of false to ensure an internal
exception is not raised.
Also note that you can only use Server.Transfer to transfer control to
pages in the same application. To transfer to pages in other applications,
you must use Response.Redirect.
More Information
For more information, see Knowledge Base article 312629, "PRB:
ThreadAbortException Occurs If You Use Response.End, Response.Redirect, or
Server.Transfer," at
http://support.microsoft.com/default.aspx?scid=kb;en-us;312629. Does this help you? Regards.
Daniel
"Bradley Cotier via .NET 247" <anonymous@dotnet247.com> schrieb im
Newsbeitrag news:uMJm5aKOEHA.3596@tk2msftngp13.phx.gbl...
Hi all
I have a query concerning Server.Transfer in ASP.NET. I have read in many
places that one of the advantages of using Server.Transfer is that it
doesn't update the browser URL therefore the client doesn't know that a
transfer has occured. However, it appears to me that it's not that the URL
doesn't change, simply that it is one step behind the current asp page. eg -
page 1 transfers to page 2. On page 2 the browser URL still shows
page1.aspx. I'm happy with this.
page 2 transfers to page 3, on page 3 the browser URL changes to page
2.aspx. I'm not happy with this.
From the developers point of view it seems that you have to place code one
page behind the aspx page which has the friendly name you wanted to link to
the code.
I'm sure this is very wrong but Server.Transfer doesn't seem very complex
and yet it has this weird effect.
Can anyone help???
--------------------------------
From: Bradley Cotier
-----------------------
Posted by a user from .NET 247 (
http://www.dotnet247.com/)
<Id>viYnFAkuWUShwpkZOrL5UQ==</Id>