Server.Transfer和Load Balanced Environments [英] Server.Transfer and Load Balanced Environments

查看:59
本文介绍了Server.Transfer和Load Balanced Environments的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候!


我想使用Server.Transfer将用户重定向到给定页面,

,同时保持表单字段的状态。这在单个

服务器上运行良好。


但是,这将部署在负载均衡的环境中。我知道

会话变量和负载均衡环境不会混合。我是否也会因为Server.Transfer而关注



提前致谢。

Chris

解决方案



" Chris Bellini" < ch ************* @ spam.chrisbellini.blows.comwrot e

消息新闻:eH ************ ** @ TK2MSFTNGP03.phx.gbl ...


问候!


我想使用Server.Transfer来将用户重定向到给定页面,

,同时保持表单字段的状态。这在单个

服务器上运行良好。


但是,这将部署在负载均衡的环境中。我知道

会话变量和负载均衡环境不会混合。我是否还有
引起关注Server.Transfer的问题?


提前致谢。


Chris



即使在

负载均衡系统中,服务器传输也不会将请求转移到另一台服务器。


我还没有对此进行过广泛的测试,但我相当确定两个

server.transfer和server.execute将保留在同一台服务器上。至少

这是理论......我会再说一遍,我没有做过任何彻底的测试

。和大多数事情一样,如果你有顾虑,那么设置一个测试就不需要花费很多




A


" Chris Bellini" < ch ************* @ spam.chrisbellini.blows.comwrot e

消息新闻:eH ************ ** @ TK2MSFTNGP03.phx.gbl ...


问候!


我想使用Server.Transfer来将用户重定向到给定页面,

,同时保持表单字段的状态。这在单个

服务器上运行良好。


但是,这将部署在负载均衡的环境中。我知道

会话变量和负载均衡环境不会混合。我是否还有
引起关注Server.Transfer的问题?


提前致谢。


Chris



Aaron Bertrand [SQL Server MVP]写道:


I还没有对此进行过广泛的测试,但我确定

肯定server.transfer和server.execute都会在同一台服务器上停留。至少那是理论......



他们必须留在同一台服务器上。他们共享一个响应流(与

Response.Redirect不同,后者告诉浏览器发送新请求,

随后不与原始请求共享响应流) 。


-

戴夫安德森


未经请求的商业电子邮件将以

Greetings!

I would like to use Server.Transfer to redirect users to a given page,
while maintaining the state of form fields. This works fine on a single
server.

However, this will be deployed in a load balanced environment. I know
that Session variables and load balanced environments don''t mix. Do I
have a cause for concern with Server.Transfer as well?

Thanks in advance.
Chris

解决方案


"Chris Bellini" <ch*************@spam.chrisbellini.blows.comwrot e in
message news:eH**************@TK2MSFTNGP03.phx.gbl...

Greetings!

I would like to use Server.Transfer to redirect users to a given page,
while maintaining the state of form fields. This works fine on a single
server.

However, this will be deployed in a load balanced environment. I know
that Session variables and load balanced environments don''t mix. Do I
have a cause for concern with Server.Transfer as well?

Thanks in advance.
Chris

Server transfer will not transfer the request to another server even in a
load balanced system.


I haven''t done extensive testing of this, but I am fairly certain that both
server.transfer and server.execute will stay on the same server. At least
that''s the theory ... I''ll repeat that I haven''t done any thorough testing
of this. As with most things, if you have concerns it shouldn''t take much
to set up a test.

A


"Chris Bellini" <ch*************@spam.chrisbellini.blows.comwrot e in
message news:eH**************@TK2MSFTNGP03.phx.gbl...

Greetings!

I would like to use Server.Transfer to redirect users to a given page,
while maintaining the state of form fields. This works fine on a single
server.

However, this will be deployed in a load balanced environment. I know
that Session variables and load balanced environments don''t mix. Do I
have a cause for concern with Server.Transfer as well?

Thanks in advance.
Chris



Aaron Bertrand [SQL Server MVP] wrote:

I haven''t done extensive testing of this, but I am fairly
certain that both server.transfer and server.execute will
stay on the same server. At least that''s the theory ...

They HAVE TO stay on the same server. They share a response stream (unlike
Response.Redirect, which tells the browser to send a new request, and
subsequently does not share a response stream with the original request).

--
Dave Anderson

Unsolicited commercial email will be read at a cost of


这篇关于Server.Transfer和Load Balanced Environments的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆