Starts in:
1 DAY
16 HRS
28 MIN
34 SEC
Starts in:
1 D
16 H
28 M
34 S
Open Closed

Error when adding identity source code to the project #6682


User avatar
0
nvc_abp_dev2 created

ABP Framework version: v7.2.2

UI Type: Angular

Database System: EF Core (SQL Server)

Auth Server Separated (for Angular): yes

Exception message and full stack trace: at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit) at Volo.Abp.Modularity.AbpModuleHelper.FindDependedModuleTypes(Type moduleType) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.FindAllModuleTypes(Type startupModuleType, ILogger logger) at Volo.Abp.Modularity.ModuleLoader.FillModules(List1 modules, IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources) at Volo.Abp.Modularity.ModuleLoader.GetDescriptors(IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources) at Volo.Abp.Modularity.ModuleLoader.LoadModules(IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources) at Volo.Abp.AbpApplicationBase.LoadModules(IServiceCollection services, AbpApplicationCreationOptions options) at Volo.Abp.AbpApplicationBase..ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) at Volo.Abp.AbpApplicationWithExternalServiceProvider..ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) at Volo.Abp.AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action1 optionsAction) at Volo.Abp.AbpApplicationFactory.<CreateAsync>d__21.MoveNext() at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.<AddApplicationAsync>d__21.MoveNext() at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.<AddApplicationAsync>d__0`1.MoveNext() at NVC.Flyguys.IdentityService.Program.

d__0.MoveNext() in C:\repo\FGBackEnd\NVC.FlyGuys\services\identity\src\NVC.Flyguys.IdentityService.HttpApi.Host\Program.cs:line 39

Steps to reproduce the issue:

Hi team,

We are trying to to replace a few front end changes from the Identity Service (Specifically the user creator, we want to replace the username and add a few custom validations). However when I dowloaded the source code with the Abp Suite, when I execute the project to check if its working correctly after using the suite to add the source code I get this error:

this is in the Program.cs

Let me know if I can provide more information

Thanks!


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Probably because other modules are using the package reference.

    I don’t recommend that you customize it through source code, it may make it difficult for you to upgrade in the future.

    Could you describe your use case and I will try to help you

  • User Avatar
    0
    nvc_abp_dev2 created

    Hi,

    Probably because other modules are using the package reference.

    I don’t recommend that you customize it through source code, it may make it difficult for you to upgrade in the future.

    Could you describe your use case and I will try to help you

    Hi Liang, thanks for the answer.

    We want to modify the User creation/update modal to hide the user name and make it the same value as the Email when they save it. Also we want to show the errors before the user hits the Save button

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This should be easy to do

    You can replace any component: https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement

    Create your users component yarn ng generate component myusers

    Replace users component with yours

    import { Component, OnInit } from '@angular/core';
    import { ReplaceableComponentsService } from '@abp/ng.core';
    import { MyUsersComponent } from './myusers/myusers.component';
    import { eIdentityComponents } from '@volo/abp.ng.identity';
    
    .....
    
    export class AppComponent implements OnInit {
      constructor( private replaceableComponents: ReplaceableComponentsService) {} 
    
      ngOnInit() {
        //...
    
        this.replaceableComponents.add({
            component: MyUsersComponent,
            key: eIdentityComponents.Users,
          });
      }
    }
    

    You can download the source code abp get-source Volo.Identity.Pro and copy the code you need

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06