public ActionResult Details(String id) { ViewLogModel model = new ViewLogModel() { Id = id }; try { ClientRegistryAdminService.ClientRegistryAdminInterfaceClient client = new ClientRegistryAdminService.ClientRegistryAdminInterfaceClient(); model.Log = client.GetLog(id.Replace("-", "_")); Trace.TraceInformation("Got a log of {0} bytes", model.Log.Length); } catch { model.Log = String.Empty; } return(View(model)); }
/// <summary> /// Download the log file /// </summary> public ActionResult Download(String id) { ViewLogModel model = new ViewLogModel() { Id = id }; try { ClientRegistryAdminService.ClientRegistryAdminInterfaceClient client = new ClientRegistryAdminService.ClientRegistryAdminInterfaceClient(); model.Log = client.GetLog(id.Replace("-", "_")); return(new ContentResult() { Content = model.Log, ContentEncoding = System.Text.Encoding.UTF8, ContentType = "text/plain" }); } catch { model.Log = String.Empty; } return(View("Details", model)); }