Ir al contenido
Docs Try Aspire
Docs Try

Azure App Service runtime configuration

Esta página aún no está disponible en tu idioma.

Azure App Service logo

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.

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:

  1. Resolves the connection information for the referenced resource.
  2. 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 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 .NET IConfiguration).
  • 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.