Skip to main content
All docs
V26.1
  • ReportDesignerConfigurationBuilder.RegisterDataSourceWizardJsonConnectionStorage<T>(Boolean) Method

    Registers a custom service that stores and provides JSON connections.

    Namespace: DevExpress.AspNetCore.Reporting

    Assembly: DevExpress.AspNetCore.Reporting.v26.1.dll

    NuGet Package: DevExpress.AspNetCore.Reporting

    Declaration

    public ReportDesignerConfigurationBuilder RegisterDataSourceWizardJsonConnectionStorage<T>(
        bool overrideWebConfigConnections
    )
        where T : class, IDataSourceWizardJsonConnectionStorage

    Parameters

    Name Type Description
    overrideWebConfigConnections Boolean

    True to use the DevExpress.DataAccess.Web.IJsonDataConnectionProviderFactory interface implemented in the storage; otherwise, use the DevExpress.DataAccess.Web.IJsonDataConnectionProviderFactory interface implemented in the viewer.

    Type Parameters

    Name Description
    T

    The type of the class that implements the DevExpress.DataAccess.Web.IDataSourceWizardJsonConnectionStorage interface.

    Returns

    Type Description
    ReportDesignerConfigurationBuilder

    A ReportDesignerConfigurationBuilder class instance.

    Remarks

    The connection storage receives, stores, and provides JSON connection strings on demand.

    The following code in the DevExpress ASP.NET Core Controls Demo registers services at the application startup:

    var builder = WebApplication.CreateBuilder(args);
    
    builder.Services.ConfigureReportingServices(configurator => {
        configurator.ConfigureReportDesigner(designerConfigurator => {
            designerConfigurator.RegisterDataSourceWizardJsonConnectionStorage<CustomDataSourceWizardJsonDataConnectionStorage>(true);
        configurator.ConfigureWebDocumentViewer(viewerConfigurator => {
            viewerConfigurator.RegisterJsonDataConnectionProviderFactory<CustomJsonDataConnectionProviderFactory>();
        });
    });
    
    var app = builder.Build();
    

    A user specifies credentials in the JSON Data Wizard to connect to the JSON data source. When the Wizard is finished, credentials are encrypted and saved. A malicious user can specify various credentials and analyze the encrypted result in an attempt to find the cryptographic key. The connection storage prevents a malicious user from accessing the encrypted credentials used in the data source connection string.

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterDataSourceWizardJsonConnectionStorage<T>(Boolean) method.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also