Open Closed

Elsa Dashboard Integration error #1551


User avatar
0
viswajwalith created

ABP Framework version: v4.3 UI type: MVCDB provider: EF Core / MongoDB Tiered (MVC) or Identity Server Separated (Angular): yes , Microservice Architecture Exception message and stack trace:

Hi,

We are trying to integrate elsa dashboard, it worked perfectly in Application template, but when we try to integrate in microservice based ABP solution getting following error when accessing the elsa dashboard.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Can you provider steps to reproduce?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    viswajwalith created

    Hi,

    Somwhow we are able to get that issue fixed by changing the way of configuring the elsa. Thanks for the support.

        private void ConfigureElsa(ServiceConfigurationContext context, IConfiguration configuration)
        {
            context.Services
                .AddElsa(
                    elsa =>
                    {
                        elsa
                        .AddMongoDbStores(configuration, databaseName: "AppV3_Elsa", connectionStringName: "ElsaServiceMongoDb");
    
                    })
    
                .AddEmailActivities(options => options.Bind(configuration.GetSection("Elsa:Smtp")))
                .AddHttpActivities(options => options.Bind(configuration.GetSection("Elsa:Server")))
                .AddTimerActivities(options => options.Bind(configuration.GetSection("Elsa:Timers")));
                
            context.Services.AddElsaDashboard(options => options.Configure(x => x.ActivityDefinitions
                                                    .Add<WriteLine>()
                                                    .Add<ReadLine>()
                                                    .Add<ReceiveHttpRequest>()
                                                    .Add<SendHttpRequest>()
                                                    .Add<WriteHttpResponse>()
                                                    .Add<SetVariable>()
                                                    .Add<ForEach>()
                                                ));
    
            context.Services.AddUserActivities();
            context.Services.AddAssemblyOf<Elsa.Dashboard.Areas.Elsa.Controllers.HomeController>();
            context.Services.AddAssemblyOf<Elsa.WorkflowDesigner.ViewComponents.WorkflowDesignerViewComponent>();
            context.Services.AddAssemblyOf<Elsa.Dashboard.Areas.Elsa.Controllers.WorkflowDefinitionController>();
            context.Services.AddAssemblyOf<Elsa.Dashboard.Areas.Elsa.Controllers.WorkflowInstanceController>();
    
            context.Services.AddNotificationHandlers(typeof(LiquidConfigurationHandler));
            //Disable antiforgery validation for elsa
            Configure<AbpAntiForgeryOptions>(options =>
            {
                options.AutoValidateFilter = type =>
                    type.Assembly != typeof(Elsa.Dashboard.Areas.Elsa.Controllers.HomeController).Assembly;
                options.AutoValidateFilter = type =>
                    type.Assembly != typeof(Elsa.WorkflowDesigner.ViewComponents.WorkflowDesignerViewComponent).Assembly;
                options.AutoValidateFilter = type =>
                    type.Assembly != typeof(Elsa.Dashboard.Areas.Elsa.Controllers.WorkflowDefinitionController).Assembly;
                options.AutoValidateFilter = type =>
                    type.Assembly != typeof(Elsa.Dashboard.Areas.Elsa.Controllers.WorkflowInstanceController).Assembly;
            });
    
        }
        
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.