Configuration settings¶
SAIF.Framework.Core is the environment-service framework provider for the SAIF platform — it implements IEnvironmentService (abstract EnvironmentServiceBase plus four concrete subclasses) rather than merely consuming an implementation supplied elsewhere. This page therefore documents both the settings this library's own code consumes (27 distinct Environment API keys, 3 AppSettings keys, 2 generic database connections resolved through a legacy proxy) and the provider-side environment-service implementation it supplies for downstream consumers.
Configuration retrieval methods¶
| Method | Class / Interface | Namespace | Usage pattern |
|---|---|---|---|
GetConfigSetting(string) |
IEnvironmentService (impl. EnvironmentServiceBase) |
SAIF.Core.Services / SAIF.Services.Common |
Plain-text runtime setting retrieval; resolves from developer-override JSON, in-memory Configurations cache, or a fetched section from the Environment API. Used pervasively by consuming classes in this library. |
GetConfigSetting<T>(string) |
IEnvironmentService (impl. EnvironmentServiceBase) |
same | Typed variant of the above; converts the resolved ConfigSetting via GetValue<T>(). No call sites found within this library's own consuming classes.* |
GetGlobalConfigSetting(string) / GetGlobalConfigSetting<T>(string) |
IEnvironmentService (impl. EnvironmentServiceBase) |
same | Retrieves a setting from the global section (as opposed to a per-application section), fetched via GetGlobalConfigSettings() (WebClient.DownloadString against {EnvironmentApiUrl}/v2/settings/{ApplicationId}/global) and cached in _globalSettings. Used internally by EnvironmentServiceBase.MachineSecurity to resolve AD/LDAP settings. |
GetSecureConfigSetting(string, string) / GetSecureConfigSetting<T>(string, string) |
IEnvironmentService (impl. EnvironmentServiceBase) |
same | Encrypted/credential setting retrieval; hits {EnvironmentApiUrl}/v2/secureSetting/{applicationId}/{track}/{section}/{key}/value?systemHashValue=... via JsonHttpClient, result cached in a SecureSettingCache keyed by configKey. No call sites found within this library's own consuming classes — this library supplies the mechanism for downstream consumers. |
LoadSection(string) |
EnvironmentServiceBase |
SAIF.Services.Common |
Fetches an entire configuration section from the Environment API ({EnvironmentApiUrl}/v2/settings/{ApplicationId}/{ApplicationHost}/{section}/section) and merges results into the in-memory Configurations cache. Invoked internally by GetConfigSettingInfo when a key is not already cached. |
Environment.GetEnvironmentVariable("EnvironmentApiUrl") |
EnvironmentServiceBase (field _environmentApiUrl) |
System |
OS-level environment variable — the base URL of the Environment API itself, read once at construction. Throws MissingEnvironmentUrlVariableException if empty when accessed via the EnvironmentApiUrl property. |
ConfigurationManager.AppSettings["<key>"] |
System.Configuration.ConfigurationManager (framework-standard) |
System.Configuration |
Direct Web.config/App.config <appSettings> reads, bypassing IEnvironmentService entirely. Used for two bootstrap/override values in EnvironmentServiceBase and one SMTP default in EmailService. |
DbConnectionManager.GetOracleConnectionString(env, string, string) / GetSqlServerConnectionString(env, string, string, string) |
DbConnectionManager (static) |
SAIF.Services.Common |
Two-level indirection: resolves an instance/server name via env.GetConfigSetting(<configKey>), then calls a legacy DbConnectionServiceProxy (ASMX/WCF client, itself built from env.GetConfigSetting("dbConnectionServiceUrl")) to obtain the live connection string, cached in-process. |
PropertiesFileUtilities.GetValue(string path) |
PropertiesFileUtilities (static) |
SAIF.Services.Common |
Legacy XML properties file pattern. Reads {app-root}\Xml\Properties.xml (path derived from HttpContext.Current.Request.ServerVariables["APPL_PHYSICAL_PATH"]) via XDocument.Load(...).XPathSelectElement(path). Declared as a public static utility with no internal call sites in this library — exists for consuming web applications to use directly.* |
Environment API settings¶
Settings retrieved via IEnvironmentService (centralized environment configuration service). "Secure" is No for all rows — no call sites for GetSecureConfigSetting were found within this library's own consuming code.
| Setting key | Method | Secure | Consuming class | Source |
|---|---|---|---|---|
dbConnectionServiceUrl |
GetConfigSetting |
No | DbConnectionManager |
Core\SAIF.Core\Services.Common\DbConnectionManager.cs |
(caller-supplied databaseConfigKey, e.g. oracleDatabase/oracleCustomDatabase) |
GetConfigSetting (indirect) |
No | DbConnectionManager |
Core\SAIF.Core\Services.Common\DbConnectionManager.cs |
(caller-supplied sqlServerConfigKey, e.g. netFrameworkSqlServer) |
GetConfigSetting (indirect) |
No | DbConnectionManager |
Core\SAIF.Core\Services.Common\DbConnectionManager.cs |
documentGeneratorServiceUrl |
GetConfigSetting |
No | DocumentService |
Core\SAIF.Core\Services\Utilities\Documents\DocumentService.cs |
idmFilePath |
GetConfigSetting |
No | DocumentService |
Core\SAIF.Core\Services\Utilities\Documents\DocumentService.cs |
documentGeneratorServiceUrl |
GetConfigSetting |
No | PrintService (same key as DocumentService) |
Core\SAIF.Core\Services\Utilities\Documents\PrintService.cs |
fileServiceUrl |
GetConfigSetting |
No | FileService |
Core\SAIF.Core\Services\Utilities\FileService.cs |
faxServiceUrl |
GetConfigSetting |
No | FaxService |
Core\SAIF.Core\Services\Utilities\Documents\FaxService.cs |
securityServiceUrl |
GetConfigSetting |
No | SecurityServiceClient |
Core\SAIF.Core\Services\ClientProxies\SecurityServiceClient.cs |
ad.ldap.host |
GetConfigSetting |
No | SecurityServiceClient |
Core\SAIF.Core\Services\ClientProxies\SecurityServiceClient.cs |
ad.ldap.internal.root |
GetConfigSetting |
No | SecurityServiceClient |
Core\SAIF.Core\Services\ClientProxies\SecurityServiceClient.cs |
ad.internal.domain |
GetConfigSetting |
No | SecurityServiceClient |
Core\SAIF.Core\Services\ClientProxies\SecurityServiceClient.cs |
ad.ldap.host |
GetGlobalConfigSetting |
No | EnvironmentServiceBase (MachineSecurity property) |
Core\SAIF.Core\Services.Common\EnvironmentServiceBase.cs |
ad.ldap.internal.root |
GetGlobalConfigSetting |
No | EnvironmentServiceBase (MachineSecurity property) |
Core\SAIF.Core\Services.Common\EnvironmentServiceBase.cs |
ad.internal.domain |
GetGlobalConfigSetting |
No | EnvironmentServiceBase (MachineSecurity property) |
Core\SAIF.Core\Services.Common\EnvironmentServiceBase.cs |
oracleDatabase |
GetConfigSetting |
No | ImagingService |
Core\SAIF.Core\Services\Utilities\Documents\ImagingService.cs |
legacyPdfServiceUrl |
GetConfigSetting |
No | ImagingService |
Core\SAIF.Core\Services\Utilities\Documents\ImagingService.cs |
imagingServiceUrl |
GetConfigSetting |
No | ImagingService |
Core\SAIF.Core\Services\Utilities\Documents\ImagingService.cs |
towerInfoServiceUrl / towerinfoserviceurl |
GetConfigSetting |
No | ImagingService (case-inconsistent literal across call sites; lookup is case-insensitive)* |
Core\SAIF.Core\Services\Utilities\Documents\ImagingService.cs |
preferenceServiceUrl |
GetConfigSetting |
No | PreferenceService |
Core\SAIF.Core\Services\Utilities\PreferenceService.cs |
pdfdatadirectory |
GetConfigSetting |
No | PdfConvertAndMergeService |
Core\SAIF.Core\Services\Utilities\Documents\PdfConvertAndMergeService.cs |
SecurityClient.ServiceUrl |
GetConfigSetting |
No | SecurityApiClient |
Core\SAIF.Core\Services\Utilities\SecurityApiClient.cs |
SecurityClient.resourcesuffix |
GetConfigSetting |
No | SecurityApiClient |
Core\SAIF.Core\Services\Utilities\SecurityApiClient.cs |
pdfServiceUrl (via EnvironmentConfigKeys.PdfServiceUrl) |
GetConfigSetting |
No | PDFService |
Core\SAIF.Core\Services\Utilities\Documents\PDFService.cs |
uc4coreapi.url |
GetConfigSetting |
No | UC4Service |
Core\SAIF.Core\Services\Utilities\UC4Service.cs |
workCalendarServiceUrl (constant UrlConfigKey) |
GetConfigSetting |
No | WorkCalendarService |
Core\SAIF.Core\Services\Utilities\WorkCalendarService.cs |
tracingdefaults.loggingapiurl |
GetConfigSetting |
No | LogService |
Core\SAIF.Core\Services\Utilities\LogService.cs |
tracingdefaults.logerrorroute |
GetConfigSetting |
No | LogService.LogException |
Core\SAIF.Core\Services\Utilities\LogService.cs |
{applicationId}.LogThreshold (dynamically constructed) |
GetConfigSetting |
No | LogService |
Core\SAIF.Core\Services\Utilities\LogService.cs |
tracingDefaults.LogThreshold |
GetConfigSetting |
No | LogService (fallback threshold) |
Core\SAIF.Core\Services\Utilities\LogService.cs |
tracingDefaults.LogPatternLayout |
GetConfigSetting |
No | LogService |
Core\SAIF.Core\Services\Utilities\LogService.cs |
tracingdefaults.LoggingApiUrl |
GetConfigSetting |
No | LogService (log4net RestAppender.RootUrl) |
Core\SAIF.Core\Services\Utilities\LogService.cs |
tracingdefaults.logroute |
GetConfigSetting |
No | LogService (log4net RestAppender.LogRoute) |
Core\SAIF.Core\Services\Utilities\LogService.cs |
internalAddressRoots |
GetConfigSetting |
No | WebEnvironmentService (InternalAddressRoots, used by IsClientExternal) |
Core\SAIF.Core\Services.Common\WebEnvironmentService.cs |
insideFirewallAddressRoots |
GetConfigSetting |
No | WebEnvironmentService (InsideFirewallAddressRoots, used by IsClientInsideFirewall) |
Core\SAIF.Core\Services.Common\WebEnvironmentService.cs |
27 distinct Environment API setting keys are directly consumed by this library's own code (the count above, excluding declared-but-unused constants).
Declared-but-not-locally-consumed EnvironmentConfigKeys constants¶
EnvironmentConfigKeys.cs declares 10 additional constants with no GetConfigSetting(EnvironmentConfigKeys.X) call site found within this library — retained as reusable constants for downstream consumers:
| Declared constant | Key value |
|---|---|
OracleCustomDatabase |
oracleCustomDatabase |
NetFrameworkSqlServer |
netFrameworkSqlServer |
FaxSoapServiceUrl |
faxSoapServiceUrl |
FaxTempStorageFolder |
faxTempStorageFolder |
ImagingApiUrl |
ImagingApiUrl |
PdfApiUrl |
PdfApi.Url |
ClaimInfoApiUrl |
ClaimInfoApiUrl |
ActivePdfServer |
activePdfServer |
K2FormsUrl |
k2formsurl |
WebContextServiceUrl |
webContextServiceUrl |
AppSettings (Web.config)¶
Settings retrieved via ConfigurationManager.AppSettings (bypassing IEnvironmentService).
| Setting key | Default value | Purpose | Consuming class | Source |
|---|---|---|---|---|
ApplicationHost |
np13 (declared in app.config) |
Fallback/override host resolution honored only on developer machines | EnvironmentServiceBase.GetHostFromAppConfig() — consumed by WindowsEnvironmentService, WcfEnvironmentService, WebEnvironmentService |
Core\SAIF.Core\Services.Common\EnvironmentServiceBase.cs; declared in Core\SAIF.Core\app.config |
EnvApiDeveloperSettingsOverride |
developerSettings.json (declared in app.config under a mismatched key name — see risks) |
Resolves a developer local-override JSON file name, only honored when IsDeveloperMachine |
EnvironmentServiceBase.DeveloperSettingsFile |
Core\SAIF.Core\Services.Common\EnvironmentServiceBase.cs; declared in Core\SAIF.Core\app.config |
SMTP_SERVER |
mail.saif.com (code-level ?? fallback; not declared in app.config) |
SMTP relay host for outbound mail | EmailService (constructor, SMTPServer field) |
Core\SAIF.Core\Services\Utilities\EmailService.cs |
app.config <appSettings> declares exactly two keys:
<add key="ApplicationHost" value="np13" />
<add key="DeveloperSettingsFile" value="developerSettings.json" />
Database connection configuration¶
No direct SqlConnection/OracleConnection construction exists in this library. Both database "connections" are resolved indirectly through a legacy connection-info service (DbConnectionServiceProxy) fronted by DbConnectionManager — 2 generic, parameterized connections in total.
| Connection name | Provider | Retrieval method | Purpose | Source |
|---|---|---|---|---|
| Oracle instance connection (generic, parameterized) | Oracle | DbConnectionManager.GetOracleConnectionString(env, databaseConfigKey, userName) → DbConnectionServiceProxy.GetOracleConnectionString(instance, userName) (ASMX/WCF call to legacy ConnectInfoSoap endpoint, http://saifonline/WebServices/wsDBConnections/ConnectInfo.asmx per app.config) |
Resolves an Oracle connection string on demand from a caller-supplied instance-name indirection (e.g. oracleDatabase/oracleCustomDatabase); result cached in-process keyed by instance+userName |
Core\SAIF.Core\Services.Common\DbConnectionManager.cs |
| SQL Server instance connection (generic, parameterized) | SQL Server | DbConnectionManager.GetSqlServerConnectionString(env, sqlServerConfigKey, databaseName, userName) → DbConnectionServiceProxy.GetSqlServerConnectionString(server, instance, userName) (same legacy ASMX/WCF ConnectInfoSoap endpoint) |
Resolves a SQL Server connection string on demand from a caller-supplied server-name indirection (e.g. netFrameworkSqlServer); cached in-process keyed by server+instance+userName |
Core\SAIF.Core\Services.Common\DbConnectionManager.cs |
No <connectionStrings> section is present in app.config — this project does not declare any static ADO.NET connection strings; all resolution is dynamic/service-based via the legacy proxy above.
Secure settings¶
No GetSecureConfigSetting call sites were found within this library's own consuming classes — only the interface declaration (IEnvironmentService) and its implementation (EnvironmentServiceBase.GetSecureConfigSetting/GetSecureConfigSetting<T>) exist here. This library supplies the secure-retrieval mechanism for downstream consumers rather than consuming it itself.
| Setting key | Encryption method | Purpose | Consuming class | Source |
|---|---|---|---|---|
| (none — mechanism only) | SystemHashUtil.ComputeHash(SystemType, string) companion hash, via EnvironmentServiceBase.GetSecureConfigSetting(configKey, systemHashValue) |
Encrypted/credential setting retrieval for downstream consumers, cached in SecureSettingCache |
EnvironmentServiceBase (provider only) |
Core\SAIF.Core\Services.Common\EnvironmentServiceBase.cs, Core\SAIF.Core\Services.Common\SystemHashUtil.cs |
Transitive configuration (from dependencies)¶
Per .csproj inspection, SAIF.Framework.Core has no <ProjectReference> elements, so there is no same-repo transitive configuration to catalog.
| Setting key | Method | Source dependency | Dependency type | Purpose |
|---|---|---|---|---|
| (none confirmed) | — | SAIF.HashUtil |
NuGet | Confirmed via Legends CLI to have no identified IEnvironmentService keys or configuration settings of its own. |
| (unresolved) | — | SAIF.Web.API.Clients |
NuGet | Legends CLI query (--doc-type configuration) returned no grounded documentation content — recorded as unknown rather than confirmed absent.** |
Configuration dependencies¶
| Dependency | Type | Required at | Impact if missing |
|---|---|---|---|
EnvironmentApiUrl OS environment variable |
OS environment variable | Startup/construction of any EnvironmentServiceBase subclass |
MissingEnvironmentUrlVariableException thrown on every operation that needs the Environment API (GetConfigSetting, LoadSection, GetGlobalConfigSettings, GetSecureConfigSetting) — a hard runtime dependency for every application built on this framework |
dbConnectionServiceUrl + caller-supplied instance/server config key |
Environment API setting + WCF/ASMX proxy | Runtime, on first database connection-string resolution | DbConnectionManager calls fail with a generic ApplicationException from GetConfigSettingInfo if the config key is missing or misspelled, rather than a clearly database-specific error* |
app.config DeveloperSettingsFile / code-read EnvApiDeveloperSettingsOverride name mismatch |
Configuration key naming | Developer-machine local override resolution | The app.config-declared DeveloperSettingsFile key is never actually read; the differently-named EnvApiDeveloperSettingsOverride key must be separately supplied by a consuming application's own config, or developer overrides silently fall through to no-override behavior |
SMTP_SERVER |
AppSettings (optional) | EmailService construction |
Falls back to the hardcoded mail.saif.com relay if not supplied by a hosting application — may send real mail from a non-prod system if that relay happens to be live* |
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Security and authorization
- API reference
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
Core\SAIF.Core\Core\Services\IEnvironmentService.csCore\SAIF.Core\Services.Common\EnvironmentServiceBase.csCore\SAIF.Core\Services.Common\WebEnvironmentService.csCore\SAIF.Core\Services.Common\WindowsEnvironmentService.csCore\SAIF.Core\Services.Common\WcfEnvironmentService.csCore\SAIF.Core\Services.Common\CustomEnvironmentService.csCore\SAIF.Core\Services.Common\IWebEnvironmentService.csCore\SAIF.Core\Services.Common\EnvironmentConfigKeys.csCore\SAIF.Core\Services.Common\EnvironmentHost.csCore\SAIF.Core\Services.Common\SecureSettingCache.csCore\SAIF.Core\Services.Common\SystemHashUtil.csCore\SAIF.Core\Services.Common\PropertiesFileUtilities.csCore\SAIF.Core\Services.Common\DbConnectionManager.csCore\SAIF.Core\Services\ClientProxies\Legacy\DbConnectionServiceProxy.csCore\SAIF.Core\Services\ClientProxies\SecurityServiceClient.csCore\SAIF.Core\Services\Utilities\SecurityApiClient.csCore\SAIF.Core\Services\Utilities\EmailService.csCore\SAIF.Core\Services\Utilities\FileService.csCore\SAIF.Core\Services\Utilities\LogService.csCore\SAIF.Core\Services\Utilities\PreferenceService.csCore\SAIF.Core\Services\Utilities\UC4Service.csCore\SAIF.Core\Services\Utilities\WorkCalendarService.csCore\SAIF.Core\Services\Utilities\Documents\DocumentService.csCore\SAIF.Core\Services\Utilities\Documents\PrintService.csCore\SAIF.Core\Services\Utilities\Documents\FaxService.csCore\SAIF.Core\Services\Utilities\Documents\ImagingService.csCore\SAIF.Core\Services\Utilities\Documents\PDFService.csCore\SAIF.Core\Services\Utilities\Documents\PdfConvertAndMergeService.csCore\SAIF.Core\Services\ServiceRegistrations.csCore\SAIF.Core\app.configCore\SAIF.Core\SAIF.Framework.Core.csproj