Example #1
0
        public void GetElmah()
        {
            var factory = new Elmah.ErrorLogPageFactory();
            var handler = factory.GetHandler(HttpContext.Current, null, null, null);

            handler.ProcessRequest(HttpContext.Current);
        }
Example #2
0
 public void GetElmahResource(string resource)
 {
     var factory = new Elmah.ErrorLogPageFactory();
     HttpContext.Current.RewritePath(FilePath(resource), "/" + resource, HttpContext.Current.Request.QueryString.ToString());
     var handler = factory.GetHandler(HttpContext.Current, null, null, null);
     handler.ProcessRequest(HttpContext.Current);
 }
Example #3
0
        public override void ExecuteResult(ControllerContext context)
        {
            var factory = new Elmah.ErrorLogPageFactory();

            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "/" + _resouceType;
                context.HttpContext.RewritePath(FilePath(context), pathInfo, context.HttpContext.Request.QueryString.ToString());
            }

            var currentApplication = (HttpApplication)context.HttpContext.GetService(typeof(HttpApplication));
            var currentContext     = currentApplication.Context;

            var httpHandler = factory.GetHandler(currentContext, null, null, null);

            if (httpHandler is IHttpAsyncHandler)
            {
                var asyncHttpHandler = (IHttpAsyncHandler)httpHandler;
                asyncHttpHandler.BeginProcessRequest(currentContext, (r) => { }, null);
            }
            else
            {
                httpHandler.ProcessRequest(currentContext);
            }
        }
Example #4
0
        public void GetElmahResource(string resource)
        {
            var factory = new Elmah.ErrorLogPageFactory();

            HttpContext.Current.RewritePath(FilePath(resource), "/" + resource, HttpContext.Current.Request.QueryString.ToString());
            var handler = factory.GetHandler(HttpContext.Current, null, null, null);

            handler.ProcessRequest(HttpContext.Current);
        }
Example #5
0
        public override void ExecuteResult(ControllerContext context)
        {
            var factory = new Elmah.ErrorLogPageFactory();

            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "." + _resouceType;
                HttpContext.Current.RewritePath(PathForStylesheet(), pathInfo, HttpContext.Current.Request.QueryString.ToString());
            }

            var httpHandler = factory.GetHandler(HttpContext.Current, null, null, null);
            httpHandler.ProcessRequest(HttpContext.Current);
        }
Example #6
0
        public override void ExecuteResult(ControllerContext context)
        {
            var factory = new Elmah.ErrorLogPageFactory();

            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "." + _resouceType;
                HttpContext.Current.RewritePath(PathForStylesheet(), pathInfo, HttpContext.Current.Request.QueryString.ToString());
            }

            var httpHandler = factory.GetHandler(HttpContext.Current, null, null, null);

            httpHandler.ProcessRequest(HttpContext.Current);
        }
Example #7
0
        public override void ExecuteResult(ControllerContext context)
        {
            var url = new UrlHelper(HttpContext.Current.Request.RequestContext);
            var factory = new Elmah.ErrorLogPageFactory();
            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "." + _resouceType;
                HttpContext.Current.RewritePath(url.AbsoluteAction("Index", "Elmah"), pathInfo, HttpContext.Current.Request.QueryString.ToString());
            }

            var handler = factory.GetHandler(HttpContext.Current, null, null, null);

            handler.ProcessRequest(HttpContext.Current);
        }
        public override void ExecuteResult(ControllerContext context)
        {
            var factory = new Elmah.ErrorLogPageFactory();
            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "." + _resouceType;
                HttpContext.Current.RewritePath(_resouceType != "stylesheet"
                        ? HttpContext.Current.Request.Path.Replace(String.Format("/{0}", _resouceType), string.Empty)
                        : HttpContext.Current.Request.Path, pathInfo, HttpContext.Current.Request.QueryString.ToString());
            }

            var handler = factory.GetHandler(HttpContext.Current, null, null, null);

            handler.ProcessRequest(HttpContext.Current);
        }
Example #9
0
        public override void ExecuteResult(ControllerContext context)
        {
            var factory = new Elmah.ErrorLogPageFactory();

            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "." + _resouceType;
                HttpContext.Current.RewritePath(_resouceType != "stylesheet"
                        ? HttpContext.Current.Request.Path.Replace(String.Format("/{0}", _resouceType), string.Empty)
                        : HttpContext.Current.Request.Path, pathInfo, HttpContext.Current.Request.QueryString.ToString());
            }

            var handler = factory.GetHandler(HttpContext.Current, null, null, null);

            handler.ProcessRequest(HttpContext.Current);
        }
Example #10
0
            public override void ExecuteResult(ControllerContext context)
            {
                //HUYDO: Please check the source of ErrorLogPageFactory.cs for how it works
                var factory = new Elmah.ErrorLogPageFactory();

                if (!string.IsNullOrEmpty(_resourceType))
                {
                    var pathInfo = "." + _resourceType;
                    System.Web.HttpContext.Current.RewritePath(_resourceType != "stylesheet"
                            ? System.Web.HttpContext.Current.Request.Path.Replace(String.Format("/{0}", _resourceType), string.Empty)
                            : System.Web.HttpContext.Current.Request.Path, pathInfo, System.Web.HttpContext.Current.Request.QueryString.ToString());
                }
                //let the Elmah factory handle this normally
                var handler = factory.GetHandler(System.Web.HttpContext.Current, null, null, null);

                handler.ProcessRequest(System.Web.HttpContext.Current);
            }
        public override void ExecuteResult(ControllerContext context) {
            var factory = new Elmah.ErrorLogPageFactory();

            if (!string.IsNullOrEmpty(_resouceType)) {
                var pathInfo = "/" + _resouceType;
                context.HttpContext.RewritePath(FilePath(context), pathInfo, context.HttpContext.Request.QueryString.ToString());
            }

            var currentContext = GetCurrentContext(context);

            var httpHandler = factory.GetHandler(currentContext, null, null, null);
            var httpAsyncHandler = httpHandler as IHttpAsyncHandler;

            if (httpAsyncHandler != null) {
                httpAsyncHandler.BeginProcessRequest(currentContext, r => { }, null);
                return;
            }

            httpHandler.ProcessRequest(currentContext);
        }
Example #12
0
        public override void ExecuteResult(ControllerContext context)
        {
            var factory = new Elmah.ErrorLogPageFactory();

            if (!string.IsNullOrEmpty(_resouceType))
            {
                var pathInfo = "/" + _resouceType;
                context.HttpContext.RewritePath(FilePath(context), pathInfo, context.HttpContext.Request.QueryString.ToString());
            }

            var currentContext = GetCurrentContext(context);

            var httpHandler      = factory.GetHandler(currentContext, null, null, null);
            var httpAsyncHandler = httpHandler as IHttpAsyncHandler;

            if (httpAsyncHandler != null)
            {
                httpAsyncHandler.BeginProcessRequest(currentContext, r => { }, null);
                return;
            }

            httpHandler.ProcessRequest(currentContext);
        }
Example #13
0
 public void GetElmah()
 {
     var factory = new Elmah.ErrorLogPageFactory();
     var handler = factory.GetHandler(HttpContext.Current, null, null, null);
     handler.ProcessRequest(HttpContext.Current);
 }