升级过程中出现了比较多的问题,前面文章也提到过几个。这次就主要介绍下httpHandler 和 httpModule 在集成和经典模式下的区别。很多文件上传等都是需要使用到httpModule去实现。我今天就出现了NeatUpload在iis7.5下出现未将对象引用到设计实例的错误。所以用httpModule作为测试案例。 1.新建测试网站WebApplication,加入MyHttpModule类实现IHttpModule接口,主要目的是测试程序是否经过了HttpModule,经过的在页面输出HttpModule字符。 代码如下: public class MyHttpModule : IHttpModule { public void Dispose() { } public void Init(HttpApplication context) { context.BeginRequest += context_BeginRequest; } protected void context_BeginRequest(object sender, EventArgs e) { var context = sender as HttpApplication; context.Response.Clear(); context.Response.Write("HttpModule"); context.Response.End(); } } 2、2.在IIS7.5部署网站,首先使用经典模式应用程序池。在web.config的
直接切换应用程序池成集成模式会发现页面输出为空。证明程序没有经过HttpModule。那在集成模式下HttpModule如何才能执行呢? 之前部署URLRewriter的时候查资料只知道需要
当时在比较急的情况下就直接删除了
IIS7.5应用程序池集成模式和经典模式的区别介绍
未经允许不得转载:福利吧|福利社|fuliba » IIS7.5应用程序池集成模式和经典模式的区别介绍
相关推荐
- 暂无文章