Skip to content

EnvironmentVariablesConfigurationProvider not load connection string prefix POSTGRESQLCONNSTR_ on Azure AppService #57545

@thohng

Description

@thohng

Description

On Azure AppService, it is able to add connection string for PostgreSQL. But the configuration does not load the PostgreSQL connection string. The workaround is select 'Custom' when adding connection string instead of 'PostgreSQL' provider.

Configuration

Setup PostgreSQL connection string on Azure AppService
image

Checking Azure AppService Environments
image

Other information

Latest code on repository:

private const string MySqlServerPrefix = "MYSQLCONNSTR_";
private const string SqlAzureServerPrefix = "SQLAZURECONNSTR_";
private const string SqlServerPrefix = "SQLCONNSTR_";
private const string CustomPrefix = "CUSTOMCONNSTR_";
private readonly string _prefix;

public class EnvironmentVariablesConfigurationProvider : ConfigurationProvider
{
	private const string MySqlServerPrefix = "MYSQLCONNSTR_";
	private const string SqlAzureServerPrefix = "SQLAZURECONNSTR_";
	private const string SqlServerPrefix = "SQLCONNSTR_";
	private const string CustomPrefix = "CUSTOMCONNSTR_";

	private readonly string _prefix;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions