Open Closed

Plug-In Modules #3798


User avatar
0
imranStem created

I have microservice architecture and I want to integrate concurrent modules as a plugin.

I have downloaded the sample concurrent login module and built the project and put the dls in a folder.

image.png

I have registered this module as a plugin in the web gateway configuration.

  context.Services.AddApplication(options =>
        {
            options.PlugInSources.AddFolder(@"D:\abp\abp6\ChurchPharmacy\plugins", System.IO.SearchOption.AllDirectories);
        });

When I run the project I am getting the below error in the web gateway.

image.png

  • ABP Framework version: v6.0

  • UI type: Angular

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace:

  • Steps to reproduce the issue:"


2 Answer(s)
  • User Avatar
    0
    imranStem created

    I am trying to integrate concurrent login in the Identity service but the problem is I have version 6.0rc.5 with OpenIdDict integration and the concurrent login sample version is 6.0rc.2 with Identity server 4 integration.

    I am struggling to replace the below file to convert into OpenIdDict.

    using System;
    using System.Threading.Tasks;
    using IdentityServer4.AspNetIdentity;
    using IdentityServer4.Validation;
    using Microsoft.AspNetCore.Identity;
    using Microsoft.Extensions.Localization;
    using Microsoft.Extensions.Logging;
    using Microsoft.Extensions.Options;
    using Volo.Abp.Data;
    using Volo.Abp.DependencyInjection;
    using Volo.Abp.Identity;
    using Volo.Abp.IdentityServer.AspNetIdentity;
    using Volo.Abp.IdentityServer.Localization;
    using IdentityUser = Volo.Abp.Identity.IdentityUser;
    
    namespace ChurchPharmacy.IdentityService.AspNetIdentity;
    
    public class ConcurrentLoginResourceOwnerPasswordValidator : AbpResourceOwnerPasswordValidator
    {
        public ConcurrentLoginResourceOwnerPasswordValidator(
            Microsoft.AspNetCore.Identity.UserManager userManager,
            Microsoft.AspNetCore.Identity.SignInManager signInManager,
            IdentitySecurityLogManager identitySecurityLogManager,
            ILogger> logger,
            IStringLocalizer localizer, IOptions abpIdentityOptions,
            IHybridServiceScopeFactory serviceScopeFactory, IOptions identityOptions) : base(userManager,
            signInManager, identitySecurityLogManager, logger, localizer, abpIdentityOptions, serviceScopeFactory,
            identityOptions)
        {
        }
    
        protected override async Task SetSuccessResultAsync(ResourceOwnerPasswordValidationContext context, IdentityUser user)
        {
            user.SetProperty(ConcurrentLoginConsts.ConcurrentLoginToken, Guid.NewGuid().ToString("N"));
            await UserManager.UpdateAsync(user);
             await base.SetSuccessResultAsync(context, user);
        }
    }
    
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,
    Can you validate that compiled DLL files and your end application are using the same version of ABP?

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 11, 2025, 10:10