Skip to main content

ConfigFileConnectionStringsProvider Class

A data connection string provider for ASP.NET MVC and ASP.NET Web Forms. This provider allows users to create new data sources based on predefined connection strings from the configuration file.

Namespace: DevExpress.DataAccess.Web

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public class ConfigFileConnectionStringsProvider :


The Web Dashboard control doesn’t expose connection strings from the configuration file. You can allow users to create new data sources based on connection strings. To do this, you need a data connection string provider (an IDataSourceWizardConnectionStringsProvider interface implementation).

You can use a predefined data connection string provider or implement a custom one.

Predefined Provider

The ConfigFileConnectionStringsProvider is a predefined implementation of the IDataSourceWizardConnectionStringsProvider interface. This provider makes all connection strings in the Web.config file available to users. Pass the ConfigFileConnectionStringsProvider instance to the DashboardConfigurator.SetConnectionStringsProvider / ASPxDashboard.SetConnectionStringsProvider method call to allow users to create new data sources based on connection strings from the configuration file.


In ASP.NET Core applications, use the DashboardConnectionStringsProvider as the predefined implementation of a data connection string provider.

The following code snippet shows how to use the default data connection string provider in ASP.NET MVC:

using DevExpress.DataAccess.Web;
// ...
DashboardConfigurator.Default.SetConnectionStringsProvider(new ConfigFileConnectionStringsProvider());

Custom Provider

If you implement the IDataSourceWizardConnectionStringsProvider interface and create your own connection string provider, you can add custom logic to your application. For example, you can use a custom provider to read connection strings from a custom source (a local file or database).

Security Considerations

For more information on security considerations in the Web Dashboard, refer to the following articles:


See Also