Configuration settings¶
SAIF.Presentation.Web.MVC is the most configuration-dependent library in this repository. It reads nine runtime settings through three distinct channels: the SAIF framework environment service (AppGlobal.EnvironmentService.GetConfigSetting, including two well-known EnvironmentConfigKeys constants that resolve database connections), the classic System.Configuration.ConfigurationManager.AppSettings collection (five keys covering error routing, trace logging, and view-state persistence), and a System.Diagnostics.TraceSwitch bound to the host <system.diagnostics><switches> section. Because it is a class library, it ships none of these values itself — its own app.config contains only a Newtonsoft.Json binding redirect, so every hosting web application must declare them.
Configuration retrieval methods¶
| Method | Class / Interface | Namespace | Usage pattern |
|---|---|---|---|
GetConfigSetting(String) — qualified |
AppGlobal.EnvironmentService |
SAIF.Framework.Security (package SAIF.BOF.Framework) |
Called inline with an EnvironmentConfigKeys constant; the returned value is handed to the connection factory (clsConnection.getConnection) or to clsMSOracleDataLayer |
GetConfigSetting(String) — unqualified |
EnvironmentService (imported via Imports SAIF) |
SAIF.Framework.Security |
Single call with a string-literal key in clsControllerBase.HandleErrors |
ConfigurationManager.AppSettings.Item(String) |
System.Configuration.ConfigurationManager |
System.Configuration |
Used both fully qualified (HandleErrors) and unqualified through Imports System.Configuration.ConfigurationManager (clsControllerBase.New), each guarded by an IsNothing check before conversion |
ConfigurationManager.AppSettings.Get(String) |
System.Configuration.ConfigurationManager |
System.Configuration |
Fully-qualified call whose result is parsed with Boolean.TryParse in ViewPageBase.PageStatePersister |
New TraceSwitch(displayName, description, defaultSwitchValue) |
System.Diagnostics.TraceSwitch |
System.Diagnostics |
Shared field initialized once per app domain; the switch level is supplied by the host <system.diagnostics><switches> section, defaulting to Error |
No GetSecureConfigSetting, SystemHashUtil.ComputeHash, DbConnectionManager, WebConfigurationManager, or <connectionStrings> usage appears in live code.
Environment API settings¶
Settings retrieved via IEnvironmentService (centralized environment configuration service).
| Setting key | Method | Data type | Purpose | Consuming class | Source |
|---|---|---|---|---|---|
netFrameworkSqlServer† (EnvironmentConfigKeys.NetFrameworkSqlServer) |
GetConfigSetting |
String | Resolves the SQL Server instance used to persist, retrieve, and delete cross-application context rows | clsContext.clsContextRepository (Delete, Retrieve, Save) |
SAIF.Presentation.Web.MVC/clsContext.vb |
oracleDatabase† (EnvironmentConfigKeys.OracleDatabase) |
GetConfigSetting |
String | Resolves the Oracle database used to load a user's authorized menu items under schema MENU |
NavigationContext.New(inUser As String) |
SAIF.Presentation.Web.MVC/NavigationContext.vb |
policymanagement.supportemaillist |
GetConfigSetting |
String | Support distribution list e-mailed for every framework-handled error | clsControllerBase.HandleErrors |
SAIF.Presentation.Web.MVC/clsControllerBase.vb |
EnvironmentConfigKeys is defined in SAIF.Framework.Security in the SAIF.BOF.Framework package, not in this repository; its literal values are NetFrameworkSqlServer = "netFrameworkSqlServer" and OracleDatabase = "oracleDatabase"†. policymanagement.supportemaillist is a string literal with no indirection. The SQL Server key is re-read on every context-repository operation rather than cached; the support e-mail list is read on every framework-handled error with no guard for a missing value.*
AppSettings (Web.config)¶
Settings retrieved via ConfigurationManager.AppSettings.
| Setting key | Default value | Purpose | Consuming class | Source |
|---|---|---|---|---|
ErrorPageName |
Not declared in this repository; code falls back to http://saifonline/weberror/processerror.aspx for callers matching 10.*.*.*, otherwise https://saifonline.saif.com/weberror/processerror.aspx |
Absolute URL of the central error page used by Central error handling (BR-MVC-025) | clsControllerBase.HandleErrors |
SAIF.Presentation.Web.MVC/clsControllerBase.vb |
TraceLogging |
Not declared; when absent, the block is skipped and clsLogTrace.IsEnabled keeps its framework default |
Diagnostic toggle for framework trace logging | clsControllerBase.New |
SAIF.Presentation.Web.MVC/clsControllerBase.vb |
PageTraceOn |
Not declared; only evaluated when TraceLogging or TraceUser is present, otherwise clsLogTrace.PageOutputEnabled keeps its framework default |
Diagnostic toggle that writes trace output into the rendered page | clsControllerBase.New |
SAIF.Presentation.Web.MVC/clsControllerBase.vb |
TraceUser |
Not declared; when absent, clsLogTrace.TraceUser is left unset |
Names a specific user to trace | clsControllerBase.New |
SAIF.Presentation.Web.MVC/clsControllerBase.vb |
EXT_VIEWSTATE_SESSION |
Not declared; Boolean.TryParse leaves the local False when missing or unparsable |
Moves view state into session storage for external/all users (BR-MVC-030) | ViewPageBase.PageStatePersister |
SAIF.Presentation.Web.MVC/ViewPageBase.aspx.vb |
All five keys are accessed in code but declared in no config file in this repository — they are supplied by the hosting application's web.config. The library's own app.config contains only an assembly binding redirect and declares no <appSettings> element. TraceLogging and PageTraceOn are converted with CBool inside a Try block whose Catch deliberately swallows all exceptions, so an unparsable trace value silently disables the remaining trace configuration; EXT_VIEWSTATE_SESSION uses Boolean.TryParse instead. TraceUser is assigned as a string with no format validation. ErrorPageName must be an absolute URL — it is concatenated with ?MSG=…&Return=… and passed to Response.Redirect.
A tenth setting, SAIFTracingSwitch, is read through System.Diagnostics.TraceSwitch rather than AppSettings: it is bound to the host <system.diagnostics><switches> section, defaults to Error, and controls TraceInfo/TraceWarning emission around unauthorized-user redirection (clsControllerBase, shared field TracingSwitch, SAIF.Presentation.Web.MVC/clsControllerBase.vb).
Database connection configuration¶
Connection strings and database provider settings consumed by this library.
| Connection name | Provider | Retrieval method | Purpose | Source |
|---|---|---|---|---|
| Cross-application context store | SQL Server (System.Data.SqlClient.SqlConnection opened by the framework factory clsConnection.getConnection) |
netFrameworkSqlServer† plus fixed arguments database APPM, application tag NETFRAMEWORK |
Persists, retrieves, and deletes rows in the Context table that carry context between SAIF applications | SAIF.Presentation.Web.MVC/clsContext.vb |
| Menu authorization data layer | Oracle (SAIF.Framework clsMSOracleDataLayer) |
oracleDatabase† plus hard-coded schema/user MENU |
Loads the user's authorized menu items via clsMenuAuthorizedItemCollection.GetMenuAuthorizedItems, backing all NavigationContext page-authorization answers |
SAIF.Presentation.Web.MVC/NavigationContext.vb |
Fixed (non-configurable) connection parameters — SQL Server database APPM, application tag NETFRAMEWORK, and Oracle schema/user MENU — are hard-coded literals; only the server/environment portion is configurable. No DbConnectionManager call, no <connectionStrings> entry, and no credential material exists in this repository — credential resolution is delegated to clsConnection and clsMSOracleDataLayer in the framework package.*
Secure settings¶
No secure configuration is retrieved. SAIF.HashUtil is a package reference of the project, but no SystemHashUtil.ComputeHash or GetSecureConfigSetting call appears in live code — database credentials are obtained inside the framework connection factory rather than through a secure-config lookup here.*
Transitive configuration (from dependencies)¶
Settings required at runtime by referenced libraries or packages, not directly consumed by this library's code.
| Setting key | Method | Source dependency | Dependency type | Purpose |
|---|---|---|---|---|
oracleDatabase† (EnvironmentConfigKeys.OracleDatabase) |
GetConfigSetting |
SAIF.Presentation | Project Reference | clsPreferences.Load builds its Oracle preference data layer (schema/user CLM) from this key; clsModelBase.Pre_Init constructs clsPreferences. The key is already required directly by this library, so it adds no new host requirement, but it is consumed under a different schema (CLM vs. MENU) |
SAIF.Business.Menu was scanned and requires no additional configuration: no IEnvironmentService, ConfigurationManager.AppSettings, or DbConnectionManager usage appears in its live code — it obtains its data portal from the caller (IDataPortalInfo passed in by NavigationContext) rather than reading configuration itself. Package-level transitive configuration for SAIF.BOF.Framework (SAIF.Framework, SAIF.Framework.Preferences), SAIF.Framework.Common, SAIF.HashUtil, and SAIF.Web.API.Clients could not be fully confirmed — whether those packages read additional keys internally is not determinable from this repository.**
Configuration dependencies¶
| Dependency | Type | Required at | Impact if missing |
|---|---|---|---|
netFrameworkSqlServer† |
Environment service setting | Request (any context save/retrieve/delete) | Context repository operations fail; cross-application hand-off breaks |
oracleDatabase† |
Environment service setting | Request (first request of a session) | NavigationContext construction fails; menu authorization cannot be established |
policymanagement.supportemaillist |
Environment service setting | Request (error handling) | Support notification e-mail cannot be sent; a missing value risks a secondary failure inside HandleErrors* |
ErrorPageName |
AppSettings key | Request (error handling) | Falls back to the hard-coded 10.*.*.* heuristic to choose an intranet or public error page |
TraceLogging / PageTraceOn / TraceUser |
AppSettings keys | Startup (controller construction) | Diagnostic tracing keeps its framework default (effectively off); an unparsable value silently disables the rest of trace configuration |
EXT_VIEWSTATE_SESSION |
AppSettings key | Request (view-state persistence) | View state is not moved into session storage; defaults to standard page-based persistence |
SAIFTracingSwitch |
<system.diagnostics><switches> section |
Startup (app domain) | Trace switch defaults to Error, the least verbose level |
Context (SQL Server, database APPM) |
Database table | Request (cross-application navigation) | Persist context rows, Retrieve and consume context rows fail |
Oracle MENU schema |
Database schema | Request (first request of a session) | Load the user's authorized menu fails; no page can be authorized |
Notes¶
- The value format expected for
netFrameworkSqlServerandoracleDatabase(server name, logical environment name, or full connection string) is decided insideclsConnection.getConnectionandclsMSOracleDataLayerin the framework package.** - Whether the framework environment service supplies defaults, throws, or returns empty for an unknown key is not observable from this repository — this determines whether missing settings fail fast or fail late.**
- Which hosting applications declare
EXT_VIEWSTATE_SESSIONasTrue, and whetherPageTraceOnis ever enabled outside development, cannot be determined here.** - The
Contexttable's owning schema on theAPPMdatabase is not stated in code — only the database and application tag are passed to the connection factory.**
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- Security and authorization
- API reference
Sources¶
- SAIF.Presentation.Web.MVC/clsContext.vb
- SAIF.Presentation.Web.MVC/clsControllerBase.vb
- SAIF.Presentation.Web.MVC/NavigationContext.vb
- SAIF.Presentation.Web.MVC/ViewPageBase.aspx.vb
- SAIF.Presentation.Web.MVC/ViewControlBase.ascx.vb
- SAIF.Presentation.Web.MVC/clsModelBase.vb
- SAIF.Presentation.Web.MVC/clsFactoryBase.vb
- SAIF.Presentation.Web.MVC/clsOnlineContext.vb
- SAIF.Presentation.Web.MVC/app.config
- SAIF.Presentation.Web.MVC/packages.config
- SAIF.Presentation.Web.MVC/SAIF.Presentation.Web.MVC.vbproj
- SAIF.Presentation.Web.MVC/My Project/Settings.settings