Author: toshok
Date: 2005-11-27 22:14:10 -0500 (Sun, 27 Nov 2005)
New Revision: 53536

Modified:
   trunk/mcs/class/System.Web/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web/HttpApplication.cs
Log:
2005-11-27  Chris Toshok  <[EMAIL PROTECTED]>

        * HttpApplication.cs (InitOnce): add Configuration_2.0 code.
        (GetHandler): same.



Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2005-11-28 03:10:10 UTC 
(rev 53535)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2005-11-28 03:14:10 UTC 
(rev 53536)
@@ -1,3 +1,8 @@
+2005-11-27  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * HttpApplication.cs (InitOnce): add Configuration_2.0 code.
+       (GetHandler): same.
+
 2005-11-26  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * HttpResponseStream.cs: Do not try to write zero bytes.

Modified: trunk/mcs/class/System.Web/System.Web/HttpApplication.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpApplication.cs    2005-11-28 
03:10:10 UTC (rev 53535)
+++ trunk/mcs/class/System.Web/System.Web/HttpApplication.cs    2005-11-28 
03:14:10 UTC (rev 53536)
@@ -143,15 +143,24 @@
                                if (modcoll != null)
                                        return;
 
+#if CONFIGURATION_2_0
+                               HttpModulesSection modules;
+                               GlobalizationSection cfg;
+                               modules = (HttpModulesSection) 
WebConfigurationManager.GetWebApplicationSection ("system.web/httpModules");
+                               cfg = (GlobalizationSection) 
WebConfigurationManager.GetWebApplicationSection ("system.web/globalization");
+#else
+                               GlobalizationConfiguration cfg;
                                ModulesConfiguration modules;
+
                                modules = (ModulesConfiguration) 
HttpContext.GetAppConfig ("system.web/httpModules");
+                               cfg = GlobalizationConfiguration.GetInstance 
(null);
+#endif
 
                                modcoll = modules.LoadModules (this);
 
                                if (full_init)
                                        HttpApplicationFactory.AttachEvents 
(this);
 
-                               GlobalizationConfiguration cfg = 
GlobalizationConfiguration.GetInstance (null);
                                if (cfg != null) {
                                        app_culture = cfg.Culture;
                                        appui_culture = cfg.UICulture;
@@ -998,16 +1007,14 @@
                        string url = request.FilePath;
                        
                        IHttpHandler handler = null;
-#if false
-                       System.Configuration.Configuration config = 
WebConfiguration.OpenWebConfiguration (request.PhysicalApplicationPath);
-                       HttpHandlersSection section;
-                       /* XXX once SystemWebSectionGroup is working, use the 
following:
-                          section = ((SystemWebSectionGroup)config.GetSection 
("system.web")).HttpHandlers;
-                        */
-                       section = (HttpHandlersSection)config.GetSection 
("system.web/httpHandlers");
+#if CONFIGURATION_2_0
+                       HttpHandlersSection section = (HttpHandlersSection) 
WebConfigurationManager.GetWebApplicationSection ("system.web/httpHandlers");
+                       object o = section.LocateHandler (verb, url);
 #else
                        HandlerFactoryConfiguration factory_config = 
(HandlerFactoryConfiguration) HttpContext.GetAppConfig 
("system.web/httpHandlers");
                        object o = factory_config.LocateHandler (verb, url);
+#endif
+
                        factory = o as IHttpHandlerFactory;
                        
                        if (factory == null) {
@@ -1015,7 +1022,6 @@
                        } else {
                                handler = factory.GetHandler (context, verb, 
url, request.PhysicalPath);
                        }
-#endif
                        context.Handler = handler;
 
                        return handler;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to