将请求从一台 IIS 7 服务器传输到另一台
有没有办法配置 IIS 7 以将请求传输到另一台服务器,其方式与 ASP.NET 中的 Server.Transfer() 方法的工作方式类似。
Is there any way to configure IIS 7 to transfer a request to another server in a similar way to how the Server.Transfer()
method works in ASP.NET.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你最好的选择是实际执行一个response.redirect,但是如果请求是一个post而不是一个get,那么你就会遇到问题,因为post数据将会丢失......你的选择是将请求代理到其他服务器或向编写自动发布(通过 JavaScript)表单的客户端做出响应。这两个选项都有点麻烦。
我的问题是为什么你想将请求传输到另一个实际的服务器。
Your best bet would be to actually do a response.redirect however if the request was a post and not a get then you have problems as the post data will be lost... your options are to proxy the request to the other server or to make a response to the client that writes an autoposting (via javascript) form. Both options are a bit of a hack.
The question I have is why you want to transfer the request to another actual server.
您不想进行静默重定向然后忘记的传输,您需要一个也处理响应的代理。
Apache 的 mod_proxy 可以做到这一点。
http://httpd.apache.org
更好的选择是修复古怪的设置。为什么需要访问互联网的应用程序不能位于可以访问互联网的计算机上?!?
You don't want to do a transfer which silently redirects and then forgets, you want a proxy which handles the response as well.
Apache with mod_proxy can do this.
http://httpd.apache.org
A better choice though would be fixing the wacky setup. Why can't the app that needs to access the internet not be on a computer that can access the internet?!?
从你在 jsobo 的回答下的评论来看:
我认为 IIS 应用程序请求路由模块可能就是答案:
您可以将其安装在面向 Internet 的 Windows 2008 服务器上,并让它将请求路由到 Windows 2003 服务器或从 Windows 2003 服务器路由请求。
Judging by your comment under jsobo's answer:
I think the IIS Application Request Routing module may be the answer here:
You could install this on your internet facing Windows 2008 server and have it route requests to and from the Windows 2003 server.