/// <summary> /// Configures the current IHttpHandler as specified by <see cref="Spring.Web.Support.PageHandlerFactory" />. If the /// <see cref="Spring.Web.Support.PageHandlerFactory" /> is not executed for the current request and an instance of /// <see cref="Page" /> is served revalidate if the instance should be configured. /// </summary> private void OnConfigureHandler(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HandlerConfigurationMetaData hCfg = (HandlerConfigurationMetaData)LogicalThreadContext.GetData(CURRENTHANDLER_OBJECTDEFINITION); if (hCfg != null) { // app.Context.Handler = // TODO: check, if this makes sense (EE) ConfigureHandlerNow(app.Context.Handler, hCfg.ApplicationContext, hCfg.ObjectDefinitionName, hCfg.IsContainerManaged); } else { Page page = app.Context.Handler as Page; if (!IsPageWithRouteHandler(page)) { return; } // In case of Routing pages are not handled by the PageHandlerFactory therefore no HandlerConfigurationMetaData // is set. IConfigurableApplicationContext applicationContext = (IConfigurableApplicationContext)WebApplicationContext.Current; string normalizedVirtualPath = WebUtils.GetNormalizedVirtualPath(page.AppRelativeVirtualPath); ControlInterceptor.EnsureControlIntercepted(applicationContext, page); ConfigureHandlerNow(page, applicationContext, normalizedVirtualPath, true); } }
///<summary> /// Configures the current IHttpHandler as specified by <see cref="Spring.Web.Support.PageHandlerFactory"/>. ///</summary> private void OnConfigureHandler(object sender, EventArgs e) { HandlerConfigurationMetaData hCfg = (HandlerConfigurationMetaData)LogicalThreadContext.GetData(CURRENTHANDLER_OBJECTDEFINITION); if (hCfg != null) { HttpApplication app = (HttpApplication)sender; // app.Context.Handler = // TODO: check, if this makes sense (EE) ConfigureHandlerNow(app.Context.Handler, hCfg.ApplicationContext, hCfg.ObjectDefinitionName, hCfg.IsContainerManaged); } }