public ActionResult InvokeSimpleErrorHandler(string resource, string subResource) { using (var writer = new StringWriter()) { var response = new HttpResponse(writer); var context = new HttpContext(System.Web.HttpContext.Current.Request, response); var factory = new SimpleErrorHandler.ErrorLogPageFactory(); var page = factory.GetHandler(context, Request.RequestType, Request.Url.ToString(), Request.PathInfo); page.ProcessRequest(context); return Content(writer.ToString()); } }
public ActionResult InvokeSimpleErrorHandler(string resource, string subResource) { using (var writer = new StringWriter()) { var response = new HttpResponse(writer); var context = new HttpContext(System.Web.HttpContext.Current.Request, response); var factory = new SimpleErrorHandler.ErrorLogPageFactory(); var page = factory.GetHandler(context, Request.RequestType, Request.Url.ToString(), Request.PathInfo); page.ProcessRequest(context); return(Content(writer.ToString())); } }