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

            handler.ProcessRequest(HttpContext.Current);
        }
Esempio n. 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);
 }
Esempio n. 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);
            }
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 13
0
 public void GetElmah()
 {
     var factory = new Elmah.ErrorLogPageFactory();
     var handler = factory.GetHandler(HttpContext.Current, null, null, null);
     handler.ProcessRequest(HttpContext.Current);
 }