public void ProcessRequest(HttpContext context)
        {
            if (GlobalServiceResolver == null) throw new Exception("GlobalServiceResolver not set");

            context.Response.Buffer = true;
            var w = new AspnetRequestWrapper(context);
            //context.Response.Output.WriteLine("Dis is {0}", context.Request.RawUrl);
            //write your handler implementation here.

            try
            {
                var dispatcher = GlobalServiceResolver.GetInstance<MasterDispatcherServlet>();
                if (!dispatcher.HandleRequest(w))
                {
                    log.Info("Master dispatcher did not handle request {0}", context.Request.Url);
                }
            }
            catch (Exception ex)
            {
                w.ClearResponse();
                w.ResponseStatus = 500;
                w.Output.WriteLine("Error: {0}", ex.Message);
            }
            finally
            {
            }
        }
예제 #2
0
        public void ProcessRequest(HttpContext context)
        {
            if (GlobalServiceResolver == null)
            {
                throw new Exception("GlobalServiceResolver not set");
            }

            context.Response.Buffer = true;
            var w = new AspnetRequestWrapper(context);

            //context.Response.Output.WriteLine("Dis is {0}", context.Request.RawUrl);
            //write your handler implementation here.

            try
            {
                var dispatcher = GlobalServiceResolver.GetInstance <MasterDispatcherServlet>();
                if (!dispatcher.HandleRequest(w))
                {
                    log.Info("Master dispatcher did not handle request {0}", context.Request.Url);
                }
            }
            catch (Exception ex)
            {
                w.ClearResponse();
                w.ResponseStatus = 500;
                w.Output.WriteLine("Error: {0}", ex.Message);
            }
            finally
            {
            }
        }