Ejemplo n.º 1
0
        private string SetupPage(HttpContext httpContext, IExceptionPage page, Exception exception, int statusCode)
        {
            foreach (var i in page.Headers)
            {
                if (httpContext.Response.Headers.ContainsKey(i.Key))
                    continue;
                httpContext.Response.Headers[i.Key] = i.Value;
            }
            httpContext.Response.StatusCode = statusCode;

            page.SetException(exception);

            return page.Render().Replace(@"\", string.Empty);
        }
Ejemplo n.º 2
0
 public ExceptionFilter(ILogger logger, IExceptionPage page)
 {
     _logger = logger;
     _page = page;
 }