Skip to content

Use the .NET Aspire Dashboard to monitor DevExpress Reports performance, track metrics, review traces, and access structured logs associated with document creation operations.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/reporting-asp-net-core-aspire

Repository files navigation

Reporting for Web - Integrate .NET Aspire Dashboard to the ASP.NET Core Reporting App

This example shows a .NET Aspire Dashboard integrated into an ASP.NET Core Document Viewer application.

.net aspire dashboard for asp .net code document viewer

Prerequisites

To work with .NET Aspire, you need the following:

Add DevExpress NuGet Packages

Reference the following NuGet packages in your Reporting application:

  • DevExpress.Aspire.Reporting
  • DevExpress.Aspire.AspNetCore.Reporting

Implementation Details

  1. Add the following project references:

    Project Reference
    AppHost/Orchestration project (usually with an *.AppHost suffix) DevExpress Reports application
    DevExpress Reports application ServiceDefaults application
  2. Open your reporting project. Add the following method calls to Program.cs:

    var builder = WebApplication.CreateBuilder(args);
    builder.Services.AddDevExpressControls();
    // Important note: Enable .NET Aspire integration after an AddDevExpressControls method call
    // Enable service discovery and configure OpenTelemetry metrics and tracing for .NET Aspire.
    // Learn more at: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/service-defaults
    builder.AddServiceDefaults();
    
    // Share trace data with the .NET Aspire Dashboard from DevExpress Reports document creation and exporting
    builder.AddReporting();
    // Share trace and metrics data with the .NET Aspire Dashboard for the DevExpress Reports back end services
    builder.AddAspNetCoreReporting();
  3. Navigate to the AppHost project. Add the following project reference code to Program.cs:

    var builder = DistributedApplication.CreateBuilder(args);
    
    builder.AddProject<Projects.DevExpressReportingApp>("webreporting")
      .WithExternalHttpEndpoints();
    
    builder.Build().Run();
  4. Build and run the *.AppHost solution to view output in the .NET Aspire dashboard.

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the .NET Aspire Dashboard to monitor DevExpress Reports performance, track metrics, review traces, and access structured logs associated with document creation operations.

Topics

Resources

License

Stars

Watchers

Forks