如题:
我创建了一个名字叫IhttpModulesTest的类库项目,又在这个项目李创建了类HelloWorldModule。我想让HelloWorldModule实现IHttpModule接口。用vs没有IHttpModule提示。要是手工打出来。编译就报错。我已经引用了
using System;
using System.Configuration;
using System.Web;
这三个命名空间,请问是什么原因。高手给指点指点。 

解决方案 »

  1.   

    问题解决,随便来个人,给分了!!
    估计你没有添加 System.Web.dll的引用 右键-》添加引用-》.net选项卡-》选择 System.Web 
      

  2.   

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    class AuthenticModule:IHttpModule 
                    { 
                        public void Dispose(){} 
                        public void Init(HttpApplication context) 
                        { 
                            context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute); 
                        } 
                      void context_PreRequestHandlerExecute(object sender, EventArgs e) 
                        { 
                            HttpApplication ha = (HttpApplication)sender; 
                            string path = ha.Context.Request.Url.ToString(); 
                      } 
                    }