-
Notifications
You must be signed in to change notification settings - Fork 2
ConnectionStrings
Tore Nestenius edited this page Nov 22, 2024
·
1 revision
This tool lists all connection strings detected by ASP.NET Core. The connection strings may come from configuration files, environment variables, or other sources available to the application's configuration system.
The tool helps you:
- Verify that the connection strings are configured in your application.
- Check how connection strings are exposed through the
ConnectionStringssection in ASP.NET Core. - Understand the limitations of connection string mapping in Azure App Service.
- The tool retrieves all entries under the
ConnectionStringssection from the ASP.NET Core configuration system. - It displays the connection string names and values in a tabular format.
- The tool specifically highlights connection strings that Azure App Service maps to the
ConnectionStringssection, such as:- MySQL
- SQL Azure
- SQL Server
- Custom
Other connection strings (e.g., RedisCache, ServiceBus) are not automatically mapped to the ConnectionStrings section and must be accessed via environment variables.
- Only the following connection string types defined in Azure App Service are displayed in the
ConnectionStringssection:- MySQL
- SQL Azure
- SQL Server
- Custom
- Other types, such as
RedisCache,NotificationHub, andServiceBus, are available only as environment variables.
To access connection strings not listed in the ConnectionStrings section, retrieve them using the appropriate environment variable names. For example:
var redisConnectionString = Environment.GetEnvironmentVariable("REDISCACHECONNSTR_conn10");