public IHttpHandler GetHandler(HttpContext context, string verb, string url, string filePath)
        {
            this.DumpRequest(context);
            HttpRequest httpRequest = context.Request;

            this.ConfigureAppName(httpRequest);
            string str   = httpRequest.QueryString[null];
            bool   flag  = string.Compare(httpRequest.HttpMethod, "GET", StringComparison.OrdinalIgnoreCase) == 0;
            bool   flag2 = System.IO.File.Exists(httpRequest.PhysicalPath);

            if ((flag && flag2) && (str == null))
            {
                return(this.WebServicesFactory.GetHandler(context, verb, url, filePath));
            }
            if (flag2)
            {
                Type     compiledType      = WebServiceParser.GetCompiledType(url, context);
                string   machineAndAppName = Dns.GetHostName() + httpRequest.ApplicationPath;
                string[] strArray          = httpRequest.PhysicalPath.Split(new char[] { '\\' });
                string   uri   = strArray[strArray.Length - 1];
                Type     type2 = (Type)s_registeredDynamicTypeTable[uri];
                if (type2 != compiledType)
                {
                    RegistrationHelper.RegisterType(machineAndAppName, compiledType, uri);
                    s_registeredDynamicTypeTable[uri] = compiledType;
                }
            }
            return(new HttpRemotingHandler());
        }
        } // ConfigureAppName

        public IHttpHandler GetHandler(HttpContext context, string verb, string url, string filePath)
        {
            // REMACT:
            // If this is a request to the root vdir, we will route it to the activation
            //   handler instead.
            //if (context.Request.ApplicationPath.Equals("/"))
            //{
            //    if (s_remActType == null)
            //        s_remActType = Type.GetType("System.Runtime.Remoting.Channels.Http.RemotingActivationHandler, System.Runtime.Remoting.Activation");
            //
            //    if (s_remActType != null)
            //        return (IHttpHandler)Activator.CreateInstance(s_remActType);
            //}

            //if (CompModSwitches.Remote.TraceVerbose) DumpRequest(context);
            //System.Diagnostics.Debugger.Break();

            InternalRemotingServices.DebugOutChnl("HttpRemotingHandlderFactory::GetHanlder: IN");

            DumpRequest(context);  //

            HttpRequest httpRequest = context.Request;

            ConfigureAppName(httpRequest);

            string queryString = httpRequest.QueryString[null];

            bool bVerbIsGET  = (String.Compare(httpRequest.HttpMethod, "GET", StringComparison.OrdinalIgnoreCase) == 0);
            bool bFileExists = File.Exists(httpRequest.PhysicalPath);

            if (bVerbIsGET && bFileExists && queryString == null)
            {
                InternalRemotingServices.DebugOutChnl("HttpRemotingHandlderFactory::GetHanlder: non-post -- send to WebServices");
                return(WebServicesFactory.GetHandler(context, verb, url, filePath));
            }
            else
            {
                InternalRemotingServices.DebugOutChnl("HttpRemotingHandlderFactory::GetHandler: post -- handling with Remoting");

                if (bFileExists)
                {
                    Type type = WebServiceParser.GetCompiledType(
                        url, context);

                    String machineAndAppName = Dns.GetHostName() + httpRequest.ApplicationPath;

                    // determine last part of url
                    String[] urlComponents = httpRequest.PhysicalPath.Split(new char[] { '\\' });
                    String   uri           = urlComponents[urlComponents.Length - 1];

                    // register the type if it has changed or hasn't been registered yet.
                    Type lastType = (Type)s_registeredDynamicTypeTable[uri];
                    if (lastType != type)
                    {
                        RegistrationHelper.RegisterType(machineAndAppName, type, uri);
                        s_registeredDynamicTypeTable[uri] = type;
                    }

                    return(new HttpRemotingHandler());
                }
                else
                {
                    return(new HttpRemotingHandler());
                }
            }
        }