public string ImportSettings(byte[] settingsFileBytes, ImportExportSettings settingsToImport, ImportSettingsAction importAction, NodeVisit visit) { ValidateByRole(visit, SystemRoleType.Admin); if (settingsToImport == ImportExportSettings.None) { return(null); } if (_compressionHelper.IsCompressed(settingsFileBytes)) { try { settingsFileBytes = _compressionHelper.UncompressDeep(settingsFileBytes); } catch (Exception e) { throw new ArgException("Failed to uncompress zip file content: " + e.Message); } } NodeSettings nodeSettings; try { nodeSettings = _serializationHelper.Deserialize <NodeSettings>(settingsFileBytes); } catch (Exception e) { throw new ArgException("Failed to deserialize node settings content: " + e.Message); } string errorMessage = null; DateTime modifiedOn = DateTime.Now; string modifiedById = visit.Account.Id; if (EnumUtils.IsFlagSet(settingsToImport, ImportExportSettings.GlobalArguments)) { IList <ConfigItem> list = NodeSettings.GetGlobalArguments(nodeSettings.GlobalArguments, modifiedById, modifiedOn); ConfigManager.Import(list, importAction); } return(errorMessage); }