public static string GetSystemConfigValue(String sessionKey, string Key, string AltKey) { string autoNumber = string.Empty; try { using (var ConfigurationClientWS = new ConfigurationClient(GetSelcommWsEndpointName())) { autoNumber = ConfigurationClientWS.GetConfigValue(sessionKey, Key, AltKey, "", false, 100, false, false); } } catch (Exception ex) { throw new Exception("Error while generating autonumber", ex); } return(autoNumber); }