---
title: Configuration settings
summary: Configuration keys consumed by this library, retrieval methods, and runtime dependencies.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
---

# Configuration settings

`SAIF.Framework.Web.Mvc` consumes configuration almost entirely through `IEnvironmentService`; it declares no `<appSettings>` or `<connectionStrings>` of its own, has no custom configuration sections, and consumes only two configuration keys directly. A much larger set of keys is required transitively at runtime because `AutofacExtensions.RegisterCommonDependencies` registers the full `SAIF.Framework.Core` web service set.

## Configuration retrieval methods

| Method | Class / Interface | Namespace | Usage pattern |
| --- | --- | --- | --- |
| `GetConfigSetting(string key)` | `IEnvironmentService` | `SAIF.Core.Services` | Constructor-injected into `WebContextService`; called once to resolve the web context WCF endpoint URL, then cached in session under `ContextServiceUrl`. |
| `UserId()` | `IEnvironmentService` | `SAIF.Core.Services` | Property-injected on `SaifAuthorizeAttribute`; supplies the current user identity for authorization and failure logging — an identity lookup, not a keyed configuration read. |
| `DbConnectionManager.GetOracleConnectionString(IEnvironmentService, string key, string prefix)` | `DbConnectionManager` | `SAIF.Data` (package `SAIF.Framework.Core`) | Called inside the Autofac registration for the `"menu"` `NHibernateUnitOfWork` to resolve the Oracle connection string for the `MENU` schema. |
| `EnvironmentConfigKeys` constants | `EnvironmentConfigKeys` | `SAIF.Services.Common` (package `SAIF.Framework.Core`) | Supplies the well-known key literals passed to the two retrieval calls above. |

`ConfigurationManager.AppSettings`, `GetSecureConfigSetting`, and `ApplicationSettingsBase`/`Settings.Default` are not used anywhere in this library.

## Environment API settings

Settings retrieved via `IEnvironmentService` (centralized environment configuration service).

| Setting key | Method | Data type | Purpose | Consuming class | Source |
| --- | --- | --- | --- | --- | --- |
| `webContextServiceUrl` (`EnvironmentConfigKeys.WebContextServiceUrl`) | `GetConfigSetting` | string | WCF endpoint URL for the remote web context service | `WebContextService` | `src/Web/WebContextService.cs` |
| `oracleDatabase` (`EnvironmentConfigKeys.OracleDatabase`) | `GetConfigSetting` (indirect, via `DbConnectionManager.GetOracleConnectionString`) | string | Oracle instance identifier used to build the `MENU` schema connection string | `AutofacExtensions` | `src/Web.Mvc/Extensions/AutofacExtensions.cs` |

`SaifAuthorizeAttribute` holds an `IEnvironmentService` but consumes only `UserId()` — it reads no configuration key itself.

## AppSettings (Web.config)

**None.** `src/app.config` contains only `<runtime><assemblyBinding>` binding redirects and a `<startup><supportedRuntime>` declaration; it declares no `<appSettings>` and no `<connectionStrings>`. No `Web.config` exists in this repository, and no `ConfigurationManager.AppSettings`/`WebConfigurationManager` call site exists in any source file.

## Database connection configuration

Connection strings and database provider settings consumed by this library.

| Connection name | Provider | Retrieval method | Purpose | Source |
| --- | --- | --- | --- | --- |
| `"menu"` (Autofac-named `NHibernateUnitOfWork`) | Oracle (`OracleUnitOfWorkFactory` + `OracleConfigurationFactory`) | `DbConnectionManager.GetOracleConnectionString(env, EnvironmentConfigKeys.OracleDatabase, "MENU")` | Backs `IRepository<BusinessOnlineMenuItem>`, injected into `MenuService` to load the Business Online navigation menu | `src/Web.Mvc/Extensions/AutofacExtensions.cs` |

A second `IUnitOfWorkFactory` named `"sqlserver"` (`SqlServerUnitOfWorkFactory` + `SqlServerConfigurationFactory`) is also registered, but no SQL Server connection string is resolved and no unit of work or repository in this library consumes it — it is provisioned for consuming applications to resolve by name.*

## Secure settings

**None.** No `GetSecureConfigSetting` call sites exist. The `SAIF.HashUtil` package is referenced in the project file but no type from it is used in source, so even the database credential path (`DbConnectionManager.GetOracleConnectionString`) resolves through the non-secure `GetConfigSetting` path.†

## Transitive configuration (from dependencies)

Settings required at runtime by `SAIF.Framework.Core` because `AutofacExtensions.RegisterCommonDependencies` calls `ServiceRegistrations.RegisterCoreServicesForWeb(builder)`, which registers the framework's full web service set. Hosting applications inherit configuration obligations for services they may never explicitly use.

| Setting key | Method | Source dependency | Dependency type | Purpose |
| --- | --- | --- | --- | --- |
| `dbConnectionServiceUrl` | `GetConfigSetting` | `SAIF.Framework.Core` | NuGet | Connection-service endpoint resolved by `DbConnectionManager` / `DbConnectionServiceProxy` on cache miss†* |
| `securityServiceUrl` | `GetConfigSetting` | `SAIF.Framework.Core` | NuGet | Backs `SecurityServiceClient`, which underpins `SaifAuthorizeAttribute`'s `IUserProfileService.GetSystemUser` / `IsAuthorized` path†* |
| `ad.ldap.host`, `ad.ldap.internal.root`, `ad.internal.domain` | `GetConfigSetting` | `SAIF.Framework.Core` | NuGet | Directory-infrastructure host/root DN consumed by `SecurityServiceClient` and `EnvironmentServiceBase` (`WebEnvironmentService`'s base)†* |
| `tracingdefaults.loggingapiurl`, `tracingdefaults.logerrorroute`, `tracingDefaults.LogThreshold`, `{applicationId}.LogThreshold`, `tracingDefaults.LogPatternLayout`, `tracingdefaults.logroute` | `GetConfigSetting` | `SAIF.Framework.Core` | NuGet | `ILogService`, consumed directly by `SaifAuthorizeAttribute.HandleUnauthorizedRequest` and `HandleExceptionAttribute`†* |
| `fileServiceUrl`, `faxServiceUrl`, `preferenceServiceUrl`, `pdfServiceUrl`, `imagingServiceUrl`, `documentGeneratorServiceUrl`, `idmFilePath`, `legacyPdfServiceUrl`, `pdfdatadirectory`, `uc4coreapi.url`, `workCalendarServiceUrl`, `SecurityClient.ServiceUrl`, `SecurityClient.resourcesuffix` | `GetConfigSetting` | `SAIF.Framework.Core` | NuGet | Registered wholesale by `ServiceRegistrations.RegisterCoreServicesForWeb`; any service a hosting application resolves demands its key at runtime†* |

The RAG-retrieved `RegisterCoreServicesForWeb` key catalog did not cleanly separate web-only registrations from the full core-service set, so some listed keys may belong to a different `ServiceRegistrations` overload.**

## Configuration dependencies

| Dependency | Type | Required at | Impact if missing |
| --- | --- | --- | --- |
| `webContextServiceUrl` | Environment API setting | First `IWebContextService` call in a session | Null `serviceUrl` surfaces as an `EndpointAddress` construction failure on the first WCF call, not at startup — there is no startup-time validation.* |
| `oracleDatabase` | Environment API setting | Container build (`RegisterCommonDependencies`) | `DbConnectionManager.GetOracleConnectionString` cannot resolve the `MENU` schema connection string; the `"menu"` unit of work fails to construct. |
| `IEnvironmentService` registration (`WebEnvironmentService`, `SingleInstance`) | Autofac registration | Container build | The singleton wraps `HttpContext.Current` captured at first resolution; every subsequent configuration lookup and `UserId()` call runs against that captured context rather than the current request — every other `IEnvironmentService` consumer elsewhere in the codebase is `InstancePerRequest`, making this lifetime look unintentional.* |
| `ServiceRegistrations.RegisterCoreServicesForWeb` (transitive) | NuGet package registration | Container build | Pulls in the full `SAIF.Framework.Core` web service set; a hosting application inherits configuration obligations for services it may not use, with failures surfacing as runtime resolution errors rather than build/startup errors.* |

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)

> **Note:** Statements marked with † are derived from dependency library
> documentation via the Legends CLI. Statements marked with * were inferred
> from code structure or contextual evidence. Statements marked with ** could
> not be confirmed; treat as unknown until verified.

## Sources
- `src/Web/WebContextService.cs`
- `src/Web.Mvc/ActionFilters/SaifAuthorizeAttribute.cs`
- `src/Web.Mvc/Extensions/AutofacExtensions.cs`
- `src/SAIF.Framework.Web.Mvc.csproj`
- `src/app.config`
- `src/Properties/AssemblyInfo.cs`
