Azure App Service runtime configuration
Konten ini belum tersedia dalam bahasa Anda.
Azure App Service is a deployment target, not a data service. There is no client library to install in apps that run on App Service. Instead, Aspire injects connection strings and resource references as environment variables when it deploys your app — exactly the same values your app reads during local development.
How configuration reaches your app
Section titled “How configuration reaches your app”When you reference a resource (database, cache, message broker, and so on) from a project in your AppHost and that project is deployed to an App Service environment, Aspire:
- Resolves the connection information for the referenced resource.
- Writes each connection property as an App Service application setting, which the platform surfaces to your app as an environment variable.
Your deployed app reads those variables using the same code it uses locally — Environment.GetEnvironmentVariable(...) in C#, process.env.* in Node.js, os.getenv(...) in Python, and so on. No special App Service SDK is required.
Connection string format
Section titled “Connection string format”Connection string environment variables follow the standard Aspire convention:
- For resources referenced by name, Aspire injects a
ConnectionStrings__<resourcename>variable (double underscore for non-.NET apps, colon separator for .NETIConfiguration). - Individual connection properties are also available as
<RESOURCENAME>_<PROPERTY>variables where applicable.
For the exact variable names exposed by each resource type, see the connection documentation for that resource — for example, Connect to PostgreSQL or Connect to Valkey.