public void ProcessRequest(HttpApplication context)
        {
            if (_host == null)
            {
                return;
            }
            string page = GetPageName(context.Request.RawUrl);

            if (page.ToLower() == "jsongateway.aspx")
            {
                context.Response.Clear();
                //ThreadContext.Properties["ClientIP"] = HttpContext.Current.Request.UserHostAddress;
                // NOTE TODO Common.Logging push ip into ClientIP variable
                if (Log.IsDebugEnabled)
                {
                    Log.Debug(__Res.GetString(__Res.Json_Begin));
                }

                try
                {
                    FluorineWebContext.Initialize();

                    Json.Rpc.JsonRpcHandler handler = new Json.Rpc.JsonRpcHandler(context.Context);
                    handler.ProcessRequest();

                    if (Log.IsDebugEnabled)
                    {
                        Log.Debug(__Res.GetString(__Res.Json_End));
                    }

                    // Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event
                    context.CompleteRequest();
                }
                catch (Exception ex)
                {
                    Log.Fatal(__Res.GetString(__Res.Json_Fatal), ex);
                    context.Response.Clear();
                    context.Response.ClearHeaders();
                    context.Response.Status = __Res.GetString(__Res.Json_Fatal404) + " " + ex.Message;
                    // Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event
                    context.CompleteRequest();
                }
            }
        }
        public void ProcessRequest(HttpApplication context)
        {
            if (_host == null)
                return;
            string page = GetPageName(context.Request.RawUrl);
            if (page.ToLower() == "jsongateway.aspx")
            {
                context.Response.Clear();
                ThreadContext.Properties["ClientIP"] = HttpContext.Current.Request.UserHostAddress;
                if (Log.IsDebugEnabled)
                    Log.Debug(__Res.GetString(__Res.Json_Begin));

                try
                {
                    FluorineWebContext.Initialize();

                    Json.Rpc.JsonRpcHandler handler = new Json.Rpc.JsonRpcHandler(context.Context);
                    handler.ProcessRequest();

                    if (Log.IsDebugEnabled)
                        Log.Debug(__Res.GetString(__Res.Json_End));

                    // Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event
                    context.CompleteRequest();
                }
                catch (Exception ex)
                {
                    Log.Fatal(__Res.GetString(__Res.Json_Fatal), ex);
                    context.Response.Clear();
                    context.Response.ClearHeaders();
                    context.Response.Status = __Res.GetString(__Res.Json_Fatal404) + " " + ex.Message;
                    // Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event
                    context.CompleteRequest();
                }
            }
        }