/* stolen from the 1.0 S.W.Config ModulesConfiguration.cs */ internal HttpModuleCollection LoadModules(HttpApplication app) { HttpModuleCollection coll = new HttpModuleCollection(); Type type; foreach (HttpModuleAction item in Modules) { type = HttpApplication.LoadType(item.Type); if (type == null) { /* XXX should we throw here? */ continue; } IHttpModule module = (IHttpModule)Activator.CreateInstance(type, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, null, null); module.Init(app); coll.AddModule(item.Name, module); } /* XXX the 1.x config stuff does this * indirectly.. I'm not sure we want to do it * here, but this keeps things working in much * the same fashion in 2.0-land. */ { IHttpModule module = new DefaultAuthenticationModule(); module.Init(app); coll.AddModule("DefaultAuthentication", module); } return(coll); }
internal HttpModuleCollection CreateModules() { HttpModuleCollection modules = new HttpModuleCollection(); foreach (HttpModuleAction action in this.Modules) { modules.AddModule(action.Entry.ModuleName, action.Entry.Create()); } modules.AddModule("DefaultAuthentication", DefaultAuthenticationModule.CreateDefaultAuthenticationModuleWithAssert()); return(modules); }
public void FixtureSetUp() { app = new HttpApplication(); module = new DefaultAuthenticationModule(); }