为什么我们不能用Server.Transfer的()到另一台服务器上的重定向 [英] Why we cant use Server.Transfer() to redirect on another server

查看:157
本文介绍了为什么我们不能用Server.Transfer的()到另一台服务器上的重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Server.Transfer的()应该被用来重定向到另一个的.aspx页面中的同一台服务器上。但是,什么是我的背后为什么不能用这个方法来重定向到ASPX页面另一台服务器或html页面上的原因是什么?
您的回答真的appriciated。

I know that Server.Transfer() should be used to redirect to another ".aspx" page on the same server. But what is the reason behind why should I not use this method to redirect to aspx page on another server or html page? Your answers are really appriciated.

推荐答案

Server.Transfer的只能发生于单HttpContext的。每一个虚拟目录或应用程序有它自己的HttpContext对象,他们不知道,他们共同存在!所以你不能做到这一点。

Server.Transfer can only happen for single HttpContext. Each virtual directory or app has its own HttpContext object and they know not that they co-exists! so you cannot do that.

这篇关于为什么我们不能用Server.Transfer的()到另一台服务器上的重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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