public async Task Exceptions() { if (User.Identity.IsAuthenticated && User.Identity.Name.Equals(_configuration["ExceptionUserId"], StringComparison.InvariantCultureIgnoreCase)) { await ExceptionalMiddleware.HandleRequestAsync(HttpContext).ConfigureAwait(false); } }
public static void UseExceptionalErrorPage(this IApplicationBuilder app) { // using exceptional to handle error pages app.Map(new PathString("/exceptions"), action => action.Use(async(context, next) => { await ExceptionalMiddleware.HandleRequestAsync(context); })); }
public async Task Exceptions() => await ExceptionalMiddleware.HandleRequestAsync(HttpContext);
/// <summary> /// This lets you access the error handler via a route in your application, secured by whatever /// mechanisms are already in place. /// </summary> /// <remarks>If mapping via RouteAttribute: [Route("errors/{path?}/{subPath?}")]</remarks> public async Task Exceptions() => await ExceptionalMiddleware.HandleRequestAsync(HttpContext).ConfigureAwait(false);
public Task InvokeErrorHandler() => ExceptionalMiddleware.HandleRequestAsync(HttpContext);