的HttpModules HttpHandlers的,什么他们的理想的使用?何时使用,何时不使用? [英] httpmodules httphandlers, whats the ideal use of them? when to use and when not to use?

查看:118
本文介绍了的HttpModules HttpHandlers的,什么他们的理想的使用?何时使用,何时不使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对的HttpModules和HttpHandlers的一些问题,我有点迷茫的他们的真正需要,我创造了许多网站,但很少使用它们,相信我不用,失去了利益,这些是什么好处?

I have some questions about httpmodules and httphandlers, i am a little confused of the real need of them, i created many websites, but rarely used them, sure i lost a benefit from not using them, what are these benefits?

在使用时不使用?

推荐答案

您可以使用的HttpModules进行身份认证,审计或URL重写。由于每个请求首先通过所有的模块,在此之前它是由HttpHandler的处理,这是应用所需特定应用code之前运行code的地方。

you could use httpmodules for authentication, auditing or url-rewriting. Since every request first passes through all modules, before it's handled by the httphandler, this is the place to apply code that you want to run before your specific application code.

您将使用一个HttpHandler,如果你不想靠asp.net引擎。例如,你可以基于AJAX,XML和XSLT它不依赖于传统的asp.net页面编写自己的渲染机制。

You would use an httphandler if you don't want to rely on the asp.net engine. for example you could write your own rendering mechanism based on AJAX, XML and XSLT which does not rely on traditional asp.net pages.

这篇关于的HttpModules HttpHandlers的,什么他们的理想的使用?何时使用,何时不使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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