Activities of "imranStem"

I have configured the Azure OpenId but when I use organization login and try to register the user, auth server throwing exception of Setting value for 'Abp.Mailing.Smtp.Password' is null or empty!

.AddOpenIdConnect("AzureOpenId", "Organisation login", options =>
           {
               options.Authority = configuration["Azure:AzureAd:Instance"] + configuration["Azure:AzureAd:TenantId"] + configuration["Azure:AzureAd:Version"];
               options.ClientId = configuration["Azure:AzureAd:ClientId"];
               options.ResponseType = OpenIdConnectResponseType.CodeIdToken; 
               options.CallbackPath = configuration["Azure:AzureAd:CallbackPath"];
               options.ClientSecret = configuration["Azure:AzureAd:ClientSecret"];
               options.RequireHttpsMetadata = false;
               options.SaveTokens = true;
               options.GetClaimsFromUserInfoEndpoint = true;
               options.Scope.Add("email");
           });

If I create user from users management then there is no error and its working fine.

  • ABP Framework version: v8.1.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I want to add one property passcode for user in create user and my account personal info section. I have followed below article and extra property is added in database.

https://abp.io/community/articles/identityuser-relationship-and-extending-it-xtv79mpx#:~:text=Extending%20the%20User%20Entity%20With,entity%20of%20the%20Identity%20Module.

private static void ConfigureExtraProperties()
{
    ObjectExtensionManager.Instance.Modules()
          .ConfigureIdentity(identity =>
          {
              identity.ConfigureUser(user =>
              {
                  user.AddOrUpdateProperty<string>(
                      "Passcode",
                      property =>
                      {
                          property.Attributes.Add(new StringLengthAttribute(12) { MinimumLength = 6 });
                          property.DisplayName = new FixedLocalizableString("Passcode");
                          property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
                      }
                  );                   

              });
          });
 }

But that property is not displaying in UI, I have angular application. Is there any configuration that I need to apply in angular application?

  • ABP Framework version: v8.1.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I want to use the SignalR the same way the IAuditingStore is working. I want to notify to the client on every new entry is added into the system for specific entity only. I auditing is working for all the entities but notification to the client should be based on specified entities in configuration. Is there any module available to performance this action?

  • ABP Framework version: v8.0.1
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have microservice architecture. I have deployed the application on the sever. When I click to login, it redirects to auth server and successfully logged in and redirected back to angular application but authentication is not working. The token api and openid-configuration api is fine. The token is also generated. I checked the logs of auth server and token is successfully validated.

I checked the administration service logs.

[08:47:56 INF] Failed to validate the token. Microsoft.IdentityModel.Tokens.SecurityTokenInvalidIssuerException: IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty. at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuerAsync(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration) at Microsoft.IdentityModel.Tokens.Validators.ValidateIssuer(String issuer, SecurityToken securityToken, TokenValidationParameters validationParameters, BaseConfiguration configuration) at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateSignature(JsonWebToken jwtToken, TokenValidationParameters validationParameters, BaseConfiguration configuration) at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateSignatureAndIssuerSecurityKey(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration) at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateJWSAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)

  • ABP Framework version: v8.1.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have Microservice architecture. I have added Custom exception filter in NxP.Shared.Hosting.Microservices.

namespace NxP.Shared.Hosting.Microservices
{
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(AbpExceptionFilter), typeof(IAsyncExceptionFilter))]
    public class GlobalExceptionFilter : AbpExceptionFilter, ITransientDependency
    {
        private readonly IDistributedEventBus _distributedEventBus;
        private readonly ILogger< GlobalExceptionFilter > _logger;

        public GlobalExceptionFilter(IDistributedEventBus distributedEventBus, ILogger< GlobalExceptionFilter > logger)
        {
            _distributedEventBus = distributedEventBus;
            _logger = logger;
        }

        public override async  Task OnExceptionAsync(ExceptionContext context)
        {
            var exception = context.Exception;
            var actionDescriptor = context.ActionDescriptor;
            var exceptionLogEto = new ExceptionLogEto
            {
                Message = exception.Message,
                Type = exception.GetType().Name,
                StackTrace = exception.InnerException?.Message ?? exception.StackTrace,
                Source = exception.Source,
                ControllerName = actionDescriptor.RouteValues["controller"],
                ActionName = actionDescriptor.RouteValues["action"],
            };

            await _distributedEventBus.PublishAsync(exceptionLogEto);
            _logger.LogInformation("Exception handled by GlobalExceptionFilter.");

            //await base.OnExceptionAsync(context);
            // throw exception;
            //context.ExceptionHandled = true;
        }
    }
}

I have added filters in services in NxPSharedHostingMicroservicesModule

 context.Services.AddTransient< GlobalExceptionFilter >();

 context.Services.AddControllers(options =>
 {
     options.Filters.AddService< GlobalExceptionFilter >();
 }).AddControllersAsServices();

I have handler in LoggingService to receive exception data and storing in database, but the event is not receiving in LoggingService. There is no exception and event data is not publishing. I have also checked the sample console application.

Handler in logging microservice.

 public class ExceptionLogHandler : IDistributedEventHandler< ExceptionLogEto >, ITransientDependency
 {
     private readonly ILogger< ExceptionLogHandler > _logger;
     private readonly IExceptionLogRepository _exceptionLogRepository;

     public ExceptionLogHandler(ILogger< ExceptionLogHandler > logger
         , IExceptionLogRepository exceptionLogRepository
         )
     {
         _logger = logger;
         _exceptionLogRepository = exceptionLogRepository;
         _logger.LogInformation("ExceptionLogHandler initialized.");
     }

     [UnitOfWork]
     public async Task HandleEventAsync(ExceptionLogEto eventData)
     {
         _logger.LogInformation("Handling exception log...");

         ExceptionLog exceptionLog = new ExceptionLog(
             Guid.NewGuid(),
             eventData.Message,
             eventData.Type,
             eventData.StackTrace,
             eventData.Source,
             eventData.ControllerName,
             eventData.ActionName,
             DateTime.Now
             );
         _logger.LogInformation(Newtonsoft.Json.JsonConvert.SerializeObject(exceptionLog));
         await _exceptionLogRepository.InsertAsync(exceptionLog);
     }
 }
  • ABP Framework version: v8.1.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have just upgraded project to latest version 8.1.0 with "abp update" command. The angular package file as below version.

"@abp/ng.account": "~8.1.3",
    "@abp/ng.components": "~8.1.3",
    "@abp/ng.core": "~8.1.3",
    "@abp/ng.oauth": "~8.1.3",
    "@abp/ng.setting-management": "~8.1.3",
    "@abp/ng.theme.shared": "~8.1.3",
    "@angular/animations": "^17.0.0",
    "@angular/common": "^17.0.0",
    "@angular/compiler": "^17.0.0",
    "@angular/core": "^17.0.0",
    "@angular/forms": "^17.0.0",
    "@angular/localize": "^17.0.0",
    "@angular/platform-browser": "^17.0.0",
    "@angular/platform-browser-dynamic": "^17.0.0",
    "@angular/router": "^17.0.0",
    "@volo/abp.commercial.ng.ui": "~8.1.2",
    "@volo/abp.ng.account": "~8.1.2",
    "@volo/abp.ng.audit-logging": "~8.1.2",
    "@volo/abp.ng.chat": "~8.1.2",
    "@volo/abp.ng.gdpr": "~8.1.2",
    "@volo/abp.ng.identity": "~8.1.2",
    "@volo/abp.ng.language-management": "~8.1.2",
    "@volo/abp.ng.account.core": "~8.1.2",
    "@volo/abp.ng.openiddictpro": "~8.1.2",
    "@volo/abp.ng.saas": "~8.1.2",
    "@volo/abp.ng.text-template-management": "~8.1.2",
    "@volosoft/abp.ng.theme.lepton-x": "^3.0.1",

After upgrading, I deleted the **node_modules **and lock file, clear the npm cache and install all the packages again. I am getting below error on ng serve.

  • ABP Framework version: v8.1.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have some pages which are not defined in routes. Lets say I have below routes which is defined in routes.

 routes.add([
      {
        path: '/wms',
        name: 'Wms',
        iconClass: 'fas fa-cubes',
        order: 5,
        layout: eLayoutType.application,
      },

      {
        path: '/wms/warehouses',
        name: 'Warehouse',
        parentName: WmsRouteNames.Wms,
        requiredPolicy: 'WmsService.Warehouses',
      },

I have a route with path '/wms/warehouses' of warehouse listing page but I have separate page to create or update the warehouse data with path '/wms/warehouses/create'. When I navigate to create page, the selection of 'Warehouse' nav item is removed and breadcrumbs is also reset to 'Home' only. I want to set active nav item and breadcrumbs also for all the pages which routes having the path which are not defined in route provider.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am using the Microservice template. I want to use external provider microsoft login.

I have checked the setting page and there is no account button to setup the external providers.

Auth Server login page with Microsoft Login Button

Angular Login Page, No Microsoft Login Button

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am using the Microservice template. I want to get the current user's roles id and organization id in my product microservice.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have microservice architecture. I have create new setting provider in administration microservice.

Custom Setting Definition Provider

public class CustomSettingDefinitionProvider : SettingDefinitionProvider, ITransientDependency
    {
        public override void Define(ISettingDefinitionContext context)
        {
            context.Add(new SettingDefinition("TotalRank", ""));
        }

    }

Custom Setting Management Provider

 public class CustomSettingManagementProvider : SettingManagementProvider, ITransientDependency
    {
        public override string Name => "W";
        public CustomSettingManagementProvider(ISettingManagementStore store)
        : base(store)
        {
        }
    }

Custom Setting Value Provider

public class CustomSettingValueProvider : SettingValueProvider
    {
        public override string Name => "W";

        public CustomSettingValueProvider(ISettingStore settingStore)
            : base(settingStore)
        {
        }

        public override Task<string> GetOrNullAsync(SettingDefinition setting)
        {
            return SettingStore.GetOrNullAsync(setting.Name, Name, null);
        }

        public override Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings)
        {
            return SettingStore.GetAllAsync(settings.Select(x => x.Name).ToArray(), Name, null);
        }
    }

I have registered custom setting definition and provider in AdministrationServiceApplicationModule

 Configure<AbpSettingOptions>(options =>
        {
            options.DefinitionProviders.Add<CustomSettingDefinitionProvider>();
        });
        Configure<SettingManagementOptions>(options =>
        {
            options.Providers.Add<CustomSettingManagementProvider>();
        });

I can add the settings by above configuration in database.

Now, I want to read the custom setting in another microservice so I have created custom setting value provider in my another microservice and I registered value provider in app module.

public class CustomSettingValueProvider : SettingValueProvider
    {
        public override string Name => "W";

        public CustomSettingValueProvider(ISettingStore settingStore)
            : base(settingStore)
        {
        }

        public override Task<string> GetOrNullAsync(SettingDefinition setting)
        {
            return SettingStore.GetOrNullAsync(setting.Name, Name, null);
        }

        public override Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings)
        {
            return SettingStore.GetAllAsync(settings.Select(v => v.Name).ToArray(), Name, null);
        }
    }
 Configure<AbpSettingOptions>(options =>
        {
            options.ValueProviders.Add<CustomSettingValueProvider>();
        });

When I read the custom setting, it giving the null value.

var setting = await _customSettingValueProvider.GetOrNullAsync(new SettingDefinition("TotalRank")) ;

I also check with provider key but it always return null value.

I have already read the setting provider document and its not giving any details for microservice architecture to read the custom setting provider from another application.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
Showing 1 to 10 of 47 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13