Added extension methods for Page404Middleware.