Skip to content

Conversation

@guardrex
Copy link
Collaborator

@guardrex guardrex commented Oct 20, 2025

Fixes #35803
Fixes #30088
Fixes #27620

NOTES

  • Major overhaul! This one is a BeAsT! 👹
  • Most examples are generic now and apply equally across UI stacks.
  • Outline is below.
  • Dan, will start with you ... then ping Tom after your approval.
  • I opened an Options article issue ... it's going to need the 🦖 Rex Treatment™ 🦖, too. Although the config samps have been moved to the samples repo, I'll need to leave them in the doc set until the Options article is addressed because it relies on them. This article (Configuration) no longer relies on them (but does cross-link them).

Outline:

  • Introductory remarks
  • Read configuration values
  • App and host configuration
  • Default app configuration sources
  • Default host configuration sources
  • Host variables
  • Security and user secrets
  • Access configuration with Dependency Injection (DI)
  • Access configuration in the Program file
  • Access configuration in the Startup class
  • Display configuration settings on startup for debugging
  • Configuration keys and values
  • How hierarchical configuration data is organized
  • Configuration providers
  • App settings file configuration (appsettings.json, appsettings.{ENVIRONMENT}.json)
  • Environment Variables Configuration Provider
    • Custom prefix for environment variables
    • Launch settings override environment variable settings
    • Escape environment variables on Linux
    • Azure App Service app settings (environment variables)
    • Connection string prefixes
  • Command-line
    • Command-line arguments
    • Switch mappings
  • Set environment and command-line arguments with Visual Studio
  • File Configuration Provider
    • INI Configuration Provider
    • JSON Configuration Provider
    • XML Configuration Provider
  • Key-per-file Configuration Provider
  • Memory Configuration Provider
  • Kestrel endpoint configuration
  • Extract a single value from configuration with type conversion (GetValue)
  • Work with sections, get a section's children, and determine if a section exists
    • GetSection
    • GetChildren and Exists
  • Bind an array
  • Custom configuration provider
  • Add configuration from an external assembly
  • Configuration-binding source generator
  • Additional resources

Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/configuration/index.md aspnetcore/fundamentals/configuration/index
aspnetcore/fundamentals/configuration/options.md aspnetcore/fundamentals/configuration/options
aspnetcore/fundamentals/dependency-injection.md aspnetcore/fundamentals/dependency-injection
aspnetcore/fundamentals/host/generic-host.md aspnetcore/fundamentals/host/generic-host
aspnetcore/fundamentals/index.md aspnetcore/fundamentals/index
aspnetcore/host-and-deploy/azure-apps/index.md aspnetcore/host-and-deploy/azure-apps/index
aspnetcore/security/app-secrets.md aspnetcore/security/app-secrets
aspnetcore/security/key-vault-configuration.md aspnetcore/security/key-vault-configuration

@guardrex guardrex self-assigned this Oct 20, 2025
@guardrex guardrex marked this pull request as draft October 20, 2025 17:41
@guardrex guardrex requested a review from danroth27 October 21, 2025 13:00
@guardrex guardrex marked this pull request as ready for review October 21, 2025 13:00
@guardrex guardrex requested a review from Copilot October 21, 2025 13:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR represents a major overhaul of the ASP.NET Core configuration documentation. The changes modernize the content to be more generic and applicable across UI stacks, update cross-references to align with the restructured configuration article, and consolidate versioned include files into more maintainable documentation patterns.

Key Changes

  • Updated cross-references throughout documentation to point to new anchor IDs in the restructured configuration article (e.g., #boa#bind-an-array, #kestrel#kestrel-endpoint-configuration)
  • Consolidated dependency injection service collection examples into versioned include files
  • Enhanced security warnings about connection strings and authentication flows
  • Deleted obsolete versioned include files (index6.md, index7.md) and replaced references to combine-di*.md files

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
aspnetcore/security/key-vault-configuration.md Updated cross-reference anchor from #boa to #bind-an-array
aspnetcore/security/app-secrets/includes/app-secrets-3-5.md Updated cross-reference anchor from #boa to #bind-an-array
aspnetcore/security/app-secrets.md Updated cross-reference anchor from #boa to #bind-an-array
aspnetcore/includes/managed-identities-conn-strings.md Enhanced security warning text about connection strings and authentication
aspnetcore/includes/environmentVarableColon.md Minor grammar and formatting improvements for environment variable separator documentation
aspnetcore/includes/combine-service-collection-60-or-later.md New include file containing service collection examples for .NET 6.0+
aspnetcore/includes/combine-service-collection-31-to-60.md New include file containing service collection examples for .NET 3.1-6.0
aspnetcore/includes/combine-di6.md Deleted obsolete include file
aspnetcore/includes/combine-di.md Deleted obsolete include file
aspnetcore/host-and-deploy/azure-apps/index.md Simplified Azure Portal configuration section with updated cross-reference
aspnetcore/fundamentals/minimal-apis/includes/webapplication*.md Updated Kestrel endpoint configuration cross-references across multiple version files
aspnetcore/fundamentals/index/includes/index*.md Updated configuration cross-references in fundamentals documentation
aspnetcore/fundamentals/index.md Updated cross-reference anchor from #default to #default-app-configuration-sources
aspnetcore/fundamentals/host/generic-host.md Updated cross-reference anchor from #default to #default-app-configuration-sources
aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-*.md Replaced references to obsolete combine-di*.md files with versioned includes
aspnetcore/fundamentals/dependency-injection.md Replaced reference to obsolete combine-di6.md file
aspnetcore/fundamentals/configuration/options/includes/options6.md Expanded inline content replacing bind6.md include with full options pattern documentation
aspnetcore/fundamentals/configuration/options.md Expanded inline content replacing bind7.md include with full options pattern documentation
aspnetcore/fundamentals/configuration/index/includes/index7.md Deleted obsolete versioned include file
aspnetcore/fundamentals/configuration/index/includes/index6.md Deleted obsolete versioned include file
aspnetcore/fundamentals/configuration/index/includes/index3-5.md Deleted obsolete versioned include file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant