# Prepare Data Source Storage | Business Intelligence Dashboard | DevExpress Documentation

The Dashboard Configurator requires you to configure **data source storage** to supply users with a set of default [data sources](/Dashboard/116522/basic-concepts-and-terminology/data-sources).

![WebDesigner_DefaultDataSources](/Dashboard/images/webdesigner_defaultdatasources123793.png)

## Create Data Source Storage

**Data source storage** is a location of settings used to connect the Web Dashboard to data sources. When you register a data source in the storage, you make this data source [available for users](/Dashboard/117002/web-dashboard/create-dashboards-on-the-web/providing-data/connect-to-an-existing-data-source). You can create one of the following storages:

- Predefined storage

    - Create a [DataSourceInMemoryStorage](/Dashboard/DevExpress.DashboardWeb.DataSourceInMemoryStorage) instance as the predefined implementation of an in-memory data source storage. Call the [DataSourceInMemoryStorage.RegisterDataSource](/Dashboard/DevExpress.DashboardWeb.DataSourceInMemoryStorage.RegisterDataSource.overloads) method to register the specified data source in the current storage.

- Custom storage

    - Implement the [IDataSourceStorage](/Dashboard/DevExpress.DashboardWeb.IDataSourceStorage) interface to create a custom data source storage. You can find one of the implementations in the following topic: [Manage Multi-Tenancy](/Dashboard/402924/web-dashboard/integrate-dashboard-component/dashboard-backend/manage-multi-tenancy#manage-data-source-access).

To register the storage for a Web Dashboard, call the [DashboardConfigurator.SetDataSourceStorage](/Dashboard/DevExpress.DashboardWeb.DashboardConfigurator.SetDataSourceStorage.overloads) method and pass the storage you created as the method’s parameter.

### ASP.NET Core

```
using DevExpress.DashboardWeb;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddDevExpressControls();
builder.Services.AddScoped<DashboardConfigurator>((IServiceProvider serviceProvider) => {
    DashboardConfigurator configurator = new DashboardConfigurator();
    // ...
    // Create and configure a data source storage.
    DataSourceInMemoryStorage dataSourceStorage = new DataSourceInMemoryStorage();

    DashboardObjectDataSource objDataSource = new DashboardObjectDataSource("Object Data Source");
    objDataSource.DataId = "objectDataSource";
    dataSourceStorage.RegisterDataSource("objDataSource", objDataSource.SaveToXml());

    configurator.SetDataSourceStorage(dataSourceStorage);

    return configurator;
});

var app = builder.Build();
```

### ASP. NET MVC

- C#
- VB.NET

<section id="tabpanel_scS1GV7cDO_tabid-csharp" role="tabpanel" data-tab="tabid-csharp">
<pre><code data-highlight-lines="[[6],[11],[13]]" class="lang-csharp">public static class DashboardConfig {
    public static void RegisterService(RouteCollection routes) {
        routes.MapDashboardRoute(&quot;dashboardControl&quot;, &quot;DefaultDashboard&quot;);

        // Configure a data source storage:
        DataSourceInMemoryStorage dataSourceStorage = new DataSourceInMemoryStorage();

        // Registers an Object data source.
        DashboardObjectDataSource objDataSource = new DashboardObjectDataSource(&quot;Object Data Source&quot;);
        objDataSource.DataId = &quot;objectDataSource&quot;;
        dataSourceStorage.RegisterDataSource(&quot;objDataSource&quot;, objDataSource.SaveToXml());

        DashboardConfigurator.Default.SetDataSourceStorage(dataSourceStorage);
    }
}
</code></pre></section>
<section id="tabpanel_scS1GV7cDO_tabid-vb" role="tabpanel" data-tab="tabid-vb" aria-hidden="true" hidden="hidden">
<pre><code data-highlight-lines="[[6],[11],[13]]" class="lang-vb">Public Module DashboardConfig
    Public Sub RegisterService(ByVal routes As RouteCollection)
        routes.MapDashboardRoute(&quot;dashboardControl&quot;, &quot;DefaultDashboard&quot;)

        &#39; Configure a data source storage:
        Dim dataSourceStorage As New DataSourceInMemoryStorage()

        &#39; Registers an Object data source.
        Dim objDataSource As New DashboardObjectDataSource(&quot;Object Data Source&quot;)
        objDataSource.DataId = &quot;objectDataSource&quot;
        dataSourceStorage.RegisterDataSource(&quot;objDataSource&quot;, objDataSource.SaveToXml())

        DashboardConfigurator.Default.SetDataSourceStorage(dataSourceStorage)
    End Sub
End Module
</code></pre></section>

## Register Data Sources

The Web Dashboard supports a wide variety of data sources. Open the article about a specific data source for configuration details:

| ASP.NET Core | ASP.NET MVC |
| --- | --- |
| [SQL](/Dashboard/116652/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/sql-data-source) | [SQL](/Dashboard/401437/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/sql-data-source) |
| [OLAP](/Dashboard/400562/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/olap-data-source) | [OLAP](/Dashboard/401436/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/olap-data-source) |
| [Excel](/Dashboard/116654/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/excel-data-source) | [Excel](/Dashboard/401433/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/excel-data-source) |
| [Object](/Dashboard/116655/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/object-data-source) | [Object](/Dashboard/401435/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/object-data-source) |
| [Entity Framework](/Dashboard/116656/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/entity-framework-data-source) | [Entity Framework](/Dashboard/401432/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/entity-framework-data-source) |
| [Data Extract](/Dashboard/116657/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/extract-data-source) | [Data Extract](/Dashboard/401434/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/extract-data-source) |
| [JSON](/Dashboard/401224/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/json-data-source) | [JSON](/Dashboard/401431/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/json-data-source) |
| [XPO](/Dashboard/401226/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/xpo-data-source) | [XPO](/Dashboard/401438/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/xpo-data-source) |
| [MongoDB](/Dashboard/403112/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/mongodb-data-source) | [MongoDB](/Dashboard/403108/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/mongodb-data-source) |
| [Data Federation](/Dashboard/402456/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-core-framework/federated-data-source) | [Data Federation](/Dashboard/400968/web-dashboard/integrate-dashboard-component/dashboard-backend/prepare-data-source-storage-for-the-aspnet-mvc-framework/federated-data-source) |

Tip

Make sure you add the configured data sources to the data storage you use in the Web Dashboard.

## Protect User Data

The Web Dashboard [saves](/Dashboard/116299/web-dashboard/integrate-dashboard-component/aspnet-web-forms-dashboard-control/prepare-dashboard-storage) user credentials used by data sources to the dashboard XML definition. 

Use the [DashboardConfigurator.PassCredentials](/Dashboard/DevExpress.DashboardWeb.DashboardConfigurator.PassCredentials) property to specify whether to pass this information to the client side (web browser). Set this property to *false* and specify connection parameters in one of the following ways to avoid any security issues:

- Specify connection parameters in appsettings.json / Web.config

    - Add a connection string to the `connectionStrings` section in the configuration file (`appsettings.json` for ASP.NET Core and `Web.config` for ASP.NET MVC).

- Create a data connections provider

    - Implement the [IDataSourceWizardConnectionStringsProvider](/CoreLibraries/DevExpress.DataAccess.Web.IDataSourceWizardConnectionStringsProvider) interface to create a data connections provider. Pass the created provider as the [DashboardConfigurator.SetConnectionStringsProvider](/Dashboard/DevExpress.DashboardWeb.DashboardConfigurator.SetConnectionStringsProvider%28DevExpress.DataAccess.Web.IDataSourceWizardConnectionStringsProvider%29) method’s parameter.

- Specify the connection parameters at runtime

    - Handle the [DashboardConfigurator.ConfigureDataConnection](/Dashboard/DevExpress.DashboardWeb.DashboardConfigurator.ConfigureDataConnection) event to specify the connection parameters at runtime.

The following examples configure the Dashboard control so that it loads data based on the current user. You can identify a user in the current session and handle the events to select the underlying data source.

[View Example: ASP.NET Core](https://github.com/DevExpress-Examples/DashboardDifferentUserDataAspNetCore)  [View Example: ASP.NET MVC](https://github.com/DevExpress-Examples/DashboardDifferentUserDataMVC)

## Example

The example shows how to make a set of data sources available for users in the Web Dashboard application.

![web-dashboard-a-list-of-data-sources](/Dashboard/images/web-dashboard-a-list-of-data-sources.png)

[View Example: ASP.NET Core](https://github.com/DevExpress-Examples/asp-net-core-dashboard-register-data-sources)  [View Example: ASP.NET MVC](https://github.com/DevExpress-Examples/asp-net-mvc-dashboard-register-data-sources)