Page lifecycle execution continues after server.transfer in 3.5 framework

T

TS

I have noticed that after switching to 3.5 from 2.0 after a server.transfer,
the page lifecycle of the new page run but when its done, it comes back to
the original page to finish the page lifecycle there. this causes errors in
my web application.

is there a change in 3.5 that causes this issue?

page_load of 1st page, => server.transfer => page_load/Render etc of 2nd
page => returns to 1st page to finish page_load and rest of events.

in 2.0, the executing code never returned to 1st page. We have exception
logging that is now getting filled up with these exceptions that it didn't
used to do in 2.0.

thanks
 
V

Vince Xu [MSFT]

Hi,

Server.Transfer will go to the new page and never return back to the
orignal page whatever in Framework 3.5 or 2.0.
But Server.Excute will.
You can set a breakpoint to check what it does.
Please check this link about it:
http://www.dotnet-guide.com/serverexecute-servertransfer.html


--
Sincerely,

Vince Xu

Microsoft Online Support


==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
 
T

TS

it is a server.transfer. it is called from the page's base class (all pages
share same base class).

I have stepped thru the code and verified it happens like I said in 3.5:
page_load of 1st page => server.transfer called in page_load => page
lifecycle events run in 2nd page => returns to 1st page to line directly
after server.transfer to finish page_load and rest page lifecycle events.


in 2.0:
page_load of 1st page => server.transfer called in page_load => page
lifecycle events run in 2nd page and ends. The line after server.transfer is
never run.

please advise
 
T

TS

I cannot recreate in a new project. it only happens in my project.

I can explicitly call response.end and the page execution still continues in
my problem project. So it seems its not really a server.transfer problem and
more of a response.end problem.

any advice?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top