JsonDataSource.ConnectionName Property

Specifies the connection name that the JsonDataSource uses to get authentication or query parameters.

Namespace: DevExpress.DataAccess.Json

Assembly: DevExpress.DataAccess.v21.1.dll


public string ConnectionName { get; set; }

Property Value

Type Default



If the JsonDataSource object retrieves JSON data from a web service endpoint that requests authentication, you should specify authentication parameters. To do this, you can use the JsonDataSource‘s ConnectionName property. Set this property to the name of the connection string defined in your application’s configuration file. The JsonDataSource object obtains authentication parameters from the specified connection string.

The following connection string illustrates how to specify basic authentication parameters, token-based authentication parameters and query parameters.

        <add name="JsonConnection" connectionString="Uri=https://northwind.netcore.io/customers.json;
        providerName="JsonSourceProvider" />

The following code demonstrates how to specify a JsonDataSource‘s ConnectionName property.

public static JsonDataSource CreateDataSourceFromConnectionString() {
    JsonDataSource jsonDataSource = new DevExpress.DataAccess.Json.JsonDataSource() {
        // The application's configuration file should include the "JsonConnection" connection string
        ConnectionName = "JsonConnection"
    return jsonDataSource;


You can also use the JsonSource object associated with the JsonDataSource to specify authentication parameters.

Refer to the Provide Authentication to Access JSON Data (Runtime Sample) topic for information on how to provide a report‘s JSON data source with authentication parameters at runtime.

See Also