public virtual ActionResult ExportXml() { if (!_permissionService.Authorize(StandardPermissionProvider.ManageDestinations)) { return(AccessDeniedView()); } try { var destinations = _destinationService.GetAllDestinations(showHidden: true); var xml = _exportManager.ExportDestinationsToXml(destinations); return(new XmlDownloadResult(xml, "destinations.xml")); } catch (Exception exc) { ErrorNotification(exc); return(RedirectToAction("List")); } }