Will Server.Transfer work through AppDomains / Web Applications?

If you have two applications that are on the same server, can you use Server.Transfer to load the page to a different AppDomain / Application?

I think not, because Server.Transfer () copies HttpContext.Items, by the way. To copy this data between AppDomains will cause threading and memory sharing issues. Isolation of threads was strictly observed in the world.

Thoughts?

+1


source to share


2 answers


No, It is Immpossible.

Server.Transfer

and Server.Execute

cannot be used in these scenarios.



However, it doesn't copy HttpContext.Items

. It is not copied. The same HttpContext

is reused.

+3


source


You cannot use Server.Transfer () in web applications. The reason is that it really just changes the page the HttpHandler is going to return, instead of completing the request and creating a new one. This causes an extra trip to the browser, but Response.Redirect () is really the way to do it.



Server.Transfer vs Response.Redirect

+2


source







All Articles