public async Task <IActionResult> Index() { try { var collect = _collector.CollectAssembly(GetType().Assembly); var buff = collect.ToByteArray(); await Response.Body.WriteAsync(buff, 0, buff.Length); return(new EmptyResult()); } catch (Exception e) { _logger.LogError(e, e.Message); return(Content(e.ToString())); } }