2009-06-14 Robert Jordan <robertj@gmx.net>
authorRobert Jordan <robertj@gmx.net>
Mon, 15 Jun 2009 20:34:46 +0000 (20:34 -0000)
committerRobert Jordan <robertj@gmx.net>
Mon, 15 Jun 2009 20:34:46 +0000 (20:34 -0000)
* ScriptHandlerFactory.cs: handle precompiled web services.

svn path=/trunk/mcs/; revision=136163

mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs

index 6533b8e030827e66243e9520f04f05296d369fc4..c96e6c341520c93ef721af2d3abaf70a5c81f301 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-14  Robert Jordan  <robertj@gmx.net>
+
+       * ScriptHandlerFactory.cs: handle precompiled web services.
+
 2009-04-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * ClientProxyHandler.cs: set cacheability to public.
index d1bb30b513b34c9a2ab7d6223d0cd83533b34ba2..77279e7b0e2cd0ba71a634000fe2c1e2d2bca8b4 100644 (file)
@@ -30,6 +30,7 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
+using System.Web.Compilation;
 using System.Web.Services.Protocols;
 using System.Web.UI;
 
@@ -47,14 +48,20 @@ namespace System.Web.Script.Services
                        HttpRequest request = context.Request;
                        string contentType = request.ContentType;
                        if (!String.IsNullOrEmpty (contentType) && contentType.StartsWith ("application/json", StringComparison.OrdinalIgnoreCase)) {
-                               Type handlerType;
+                               Type handlerType = null;
                                if (url.EndsWith (ProfileService.DefaultWebServicePath, StringComparison.Ordinal))\r
                                        handlerType = typeof (ProfileService);
                                else
                                if (url.EndsWith (AuthenticationService.DefaultWebServicePath, StringComparison.Ordinal))
                                        handlerType = typeof(AuthenticationService);
-                               else
-                                       handlerType = WebServiceParser.GetCompiledType (url, context);
+                               else {
+#if !TARGET_JVM
+                                       handlerType = BuildManager.GetCompiledType (url);
+#endif
+                                       if (handlerType == null)
+                                               handlerType = WebServiceParser.GetCompiledType (url, context);
+                               }
+
                                return RestHandler.GetHandler (context, handlerType, url);
                        }
                        if (request.PathInfo.StartsWith ("/js", StringComparison.OrdinalIgnoreCase))