INFRA-0004: Dual App Setting Keys for MvcReportViewer
Status
Accepted
Date
2026-03-25
Context
When updating App Service settings to change the SSRS URL, updating only the camelCase key (MvcReportViewerReportServerUrl) did not fully fix report viewing. Investigation revealed two distinct keys are required:
Key 1 — dot-notation: MvcReportViewer.ReportServerUrl
- Read by the MvcReportViewer NuGet package (v0.8.3) at runtime
- Used to render the
MvcReportViewer.aspxpage (the iframe host)
Key 2 — camelCase: MvcReportViewerReportServerUrl
- Read by C# code in
ReportsController,SAFormService, andReferralFormService - Used when constructing SSRS URLs programmatically
Both keys must resolve to the same SSRS base URL. If only one is updated, some report paths work and others don’t — creating a confusing partial failure.
This is not a pattern we chose — it’s a constraint of the MvcReportViewer package and the existing C# code. The package uses dot-notation because Azure App Service historically didn’t support dots in setting names (it does now, but the package predates that). The C# code uses camelCase, likely added later without awareness of the package’s own key.
Decision
Always update both keys together when changing the SSRS URL. Treat them as a pair. Document this requirement explicitly wherever the configuration is referenced.
There is no value in consolidating to one key without a code change to the C# consumers and/or a MvcReportViewer package upgrade. That work is out of scope and would require testing across all report types.
Consequences
Positive
- Operators are aware of the dual-key requirement before making changes — prevents partial failures
- Both keys are documented with their sources
Negative
- Two settings must always be kept in sync — operational overhead
- Easy to miss if someone doesn’t read the documentation
Where These Keys Live
| Environment | Key Store | Notes |
|---|---|---|
| nonprod slots (dev, qa, reg, uat) | Azure App Service application settings | Set directly |
| trn slot | Key Vault refs → kv-eshars-training | Different pattern — see INFRA-0003 |
| prod | Azure App Service application settings | Scheduled update — see Change Record |
Current Values (nonprod, post 2026-03-25)
| Key | Value |
|---|---|
MvcReportViewer.ReportServerUrl | http://10.1.0.4/{instance} |
MvcReportViewerReportServerUrl | http://10.1.0.4/{instance} |
Where {instance} is QAReportServer, REGReportServer, or UATReportServer depending on the slot.