TransferRequest VS在ASP.Net转移 [英] TransferRequest vs Transfer in ASP.Net

查看:292
本文介绍了TransferRequest VS在ASP.Net转移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过下述环节消失了,

I have gone through the links mentioned below,

iis的论坛和<一个href=\"http://stackoverflow.com/questions/2254849/asp-net-httpmodules-server-transfer-server-transferrequest-rewritepath-pro\">HttpModules &安培; Server.Transfer的/ Server.TransferRequest / RewritePath问题的。但无法赶上这些转移方法背后的概念。

iis forum and HttpModules & Server.Transfer / Server.TransferRequest / RewritePath problems. but unable to catch the concept behind these transfer methods.

他们如何工作的?哪一个是在不同的情况下pferred $ P $?

How are they works? And which one is preferred in different situation?

有人能解释我TransferRequest VS在asp.net传输方法服务器端转移其角色?

Can someone explain me TransferRequest vs Transfer methods for server side transfer in asp.net and its roles?

在此先感谢

推荐答案

HttpServerUtility.Transfer 当前页面的终止执行,并开始提供URL的执行。
这基本上映射并执行了新的ASP.NET页面(或提供静态文件),与提供的网址。它在当前请求管道此就地,而不应用新的配置到新的URL,或为新的URL重新运行IIS模块。正因为如此,它的速度非常快,但它也prevents很多是可以与TRQ场景。

HttpServerUtility.Transfer Terminates execution of the current page and starts execution of provided URL. This basically maps and executes a new ASP.NET Page (or serves a static file) corresponding to the url provided. It does this in-place in the current request pipeline, without applying new configuration to the new url, or re-running IIS modules for the new url. Because of this, its very fast, but it also prevents a lot of scenarios that are possible with TRQ.

HttpServerUtility.TransferRequest 执行所提供的URL的异步执行。
这是在幕后一个完整的IIS子请求,这使得它能够重新运行了新的要求,整个请求管道,如果它是一个独立的请求,得到正确的配置了,运行一切正常IIS模块,包括身份验证,授权等。例如,IIS将适用于授权规则为新的URL,而不是在previous网址。

HttpServerUtility.TransferRequest Performs an asynchronous execution of the provided URL. This is a full IIS child request under the covers, which allows it to re-run the entire request pipeline for the new request as if it was a separate request, getting the correct configuration for it, and running all of the normal IIS modules including authentication, authorization, etc. For example, IIS will apply the authorization rules for the new url, as opposed to the previous url.

这篇关于TransferRequest VS在ASP.Net转移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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