diff --git a/core/helpers.asp b/core/helpers.asp index a735410..4e6f87c 100644 --- a/core/helpers.asp +++ b/core/helpers.asp @@ -78,7 +78,7 @@ Public Function GetEnvironmentValue(name) End Function Public Function GetSecureSetting(key, envName) - Dim value + Dim value, envValue value = Trim(CStr(GetAppSetting(key))) If Len(value) > 0 And LCase(value) <> "nothing" Then @@ -86,9 +86,13 @@ Public Function GetSecureSetting(key, envName) Exit Function End If - value = Trim(CStr(GetEnvironmentValue(envName))) - If Len(value) > 0 Then - GetSecureSetting = value + envValue = Trim(CStr(GetEnvironmentValue(envName))) + If Len(envValue) > 0 Then + On Error Resume Next + UpdateAppSetting key, envValue + Err.Clear + On Error GoTo 0 + GetSecureSetting = envValue Exit Function End If