public static string ExpandSAFCore() { string result; try { string cipherString = SAFConfiguration.readConnectionStringCoreEncrypted(); string text = CryptorEngineTripleDES.Decrypt(cipherString, SAFSecurityKeys.getSecurityInfoFromWConfig(), true); result = text; } catch (Exception ex) { LOGGER.Write(LOGGER.LogCategory.ERROR, "SF.Expand.SAF.Core.DBConnectionString::ExpandSAFCore[]\r\n" + ex.Message, null); result = null; } return(result); }
public static string ExpandSAFCore() { string result; try { result = CryptorEngineTripleDES.Decrypt(SAFConfiguration.readConnectionStringCoreEncrypted(), new SecurityInfo(SAFConfiguration.readMasterKey(), SAFConfiguration.readInfoKey(), SAFConfiguration.readInfoIV()), true); } catch (Exception ex) { SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[] { "http://sfexpand.SAFCore.dbConnectionString.softfinanca.com/", Assembly.GetExecutingAssembly().FullName.ToString(), ex.ToString() }); result = null; } return(result); }
public override void ProcessMessage(SoapMessage message) { try { if (message.Stage == SoapMessageStage.AfterDeserialize) { string _mtd = this._processSoap(message); string _userExecute = string.Format("USERID '{0}' ", "unknown"); foreach (SoapHeader header in message.Headers) { if (header is AuthHeader) { AuthHeader credentials = (AuthHeader)header; try { switch (credentials.CryptoAlgorithm) { case AuthHeader.CryptoAlgorithmEnum.NONE: _userExecute = string.Format("USERID '{0}' ", credentials.AuthKey.Split(new char[] { '|' })[0]); break; case AuthHeader.CryptoAlgorithmEnum.TRIPLEDES: _userExecute = string.Format("USERID '{0}' ", CryptorEngineTripleDES.Decrypt(SAFConfiguration.readConnectionStringCoreEncrypted(), new SecurityInfo(SAFConfiguration.readMasterKey(), SAFConfiguration.readInfoKey(), SAFConfiguration.readInfoIV()), true).Split(new char[] { '|' })[0]); break; } } catch (SoapException ex) { SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFAPILOGGER", new string[] { "http://sfexpand.SAFBusiness.AuthExtension.softfinanca.com/", ex.ToString() }); } } } SAFLOGGER.dump(SAFLOGGER.LOGGEREventID.INFORMATION, "SAFAPILOGGER", new string[] { _userExecute + _mtd }); } } catch { } }