web developer tips (43):通过请求处理管道注册IHttpModule
2009-09-06 – 19:30
原文地址:The way you register your IHttpModule depends on the request processing pipeline in which your module will run
建立和运行自定义IHttpModule需要做三件简单的事:
1、把源码编译成dll。
2、在net里注册。
3、在IIS配置系统里注册。
http://www.watch-life.net/visual-studio/register-your-ihttpmodule-depends-on-the-pipeline.html
1)假定你有个简单的模块,在验证发生之前,触发一个用HttpContext 做参数的事件,在BeginRequest事件写如下代码:
public void Init(HttpApplication context)
{
context.BeginRequest += new System.EventHandler(context_BeginRequest)......[阅读全文]
分类: Visual Studio | 没有评论 »

