1 新建一个类,实现IHttpModule接口
2 在web项目中应用
只要在web.config的httpModules节点下面添加如下配置即可。
<httpModules>
<add name="SqlHttpModule" type="DotNet.Common.WebForm.SqlHttpModule, DotNet.Common.WebForm"></add>
</httpModules>
或者是:
<httpModules>
<add name="SqlHttpModule" type="DotNet.Common.WebForm.SqlHttpModule"></add>
</httpModules>
type的值是 公共类的命名空间+类名