Activities of "paykoolbackend"

Hi,

This is because the abp suite could not find the Permissions.cs in your solution

You can try add a Permissions.cs to your application contract project.

there is MyProjectNamePermission.cs under aspnet-core\src\PayKool.CAS.Application.Contracts\Permissions already , but still is the same error [Cannot find Permissions.cs] , will the abp suite find the wrong path ?

An

yes, my abp suite version is 7.1.1, application is not up and running and Permission tables are present . Permission tables are present

log: 2024-05-24 18:31:50.845 +08:00 [INF] 1/11 - EntityGenerateCommand started... 2024-05-24 18:31:52.544 +08:00 [INF] 1/11 - EntityGenerateCommand completed. | Duration: 1697 ms. 2024-05-24 18:31:52.546 +08:00 [INF] 2/11 - RepositoryCommand started... 2024-05-24 18:31:52.733 +08:00 [INF] 2/11 - RepositoryCommand completed. | Duration: 187 ms. 2024-05-24 18:31:52.733 +08:00 [INF] 3/11 - ManagerCommand started... 2024-05-24 18:31:52.760 +08:00 [INF] 3/11 - ManagerCommand completed. | Duration: 26 ms. 2024-05-24 18:31:52.760 +08:00 [INF] 4/11 - AppServiceCommand started... 2024-05-24 18:32:00.368 +08:00 [INF] 4/11 - AppServiceCommand completed. | Duration: 7607 ms. 2024-05-24 18:32:00.369 +08:00 [INF] 5/11 - ProxyControllerCommand started... 2024-05-24 18:32:00.393 +08:00 [INF] 5/11 - ProxyControllerCommand completed. | Duration: 24 ms. 2024-05-24 18:32:00.393 +08:00 [INF] 6/11 - PermissionCommand started... 2024-05-24 18:32:00.416 +08:00 [WRN] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "Cannot find Permissions.cs", "details": null, "data": {}, "validationErrors": null }

2024-05-24 18:32:00.417 +08:00 [WRN] Cannot find Permissions.cs Volo.Abp.UserFriendlyException: Cannot find Permissions.cs

i think the abp suite may find the wrong namespace when finding the Permissions.cs? thanks.

Hello,

You can call the IPermissionDefinitionManager.GetGroupsAsync in the OnApplicationInitialization. Give it a try.

for your information i use dotnet version - 7.0.409 and ABP CLI 7.1.1 and window 11 , the source code is fine with window 10 , but i don't sure if it is matter or other abp version or abp setting related. Thanks.

Hello,

You can call the IPermissionDefinitionManager.GetGroupsAsync in the OnApplicationInitialization. Give it a try.

thanks for your quick response , but i have tried these code var permissionManager = context.ServiceProvider.GetRequiredService<IPermissionDefinitionManager>(); var permissionGroups = permissionManager.GetGroupsAsync().Result; on OnApplicationInitialization , still show the same error when generate code

  • ABP Framework version: v7.1.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Exception message and full stack trace: 2024-05-24 17:05:59.936 +08:00 [INF] 6/11 - PermissionCommand started... 2024-05-24 17:05:59.937 +08:00 [WRN] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "Cannot find Permissions.cs", "details": null, "data": {}, "validationErrors": null }

2024-05-24 17:05:59.937 +08:00 [WRN] Cannot find Permissions.cs Volo.Abp.UserFriendlyException: Cannot find Permissions.cs at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.PermissionCommand.Ney8Fsho0y() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.PermissionCommand.u7W8hAGcWy() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.PermissionCommand.ExecuteAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.CommandManager.ExecuteAllAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.CrudPageGenerator.GenerateAsync(EntityModel entity, Solution solution) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync(Guid solutionId, EntityModel entity) at lambda_method1935(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

  • Steps to reproduce the issue: when i use abp suite to create new entity and click save and generate , it show error : Cannot find Permissions.cs i have a permission.cs call XXXpermission.cs under Project.XXX.Application.Contracts.Permissions , how can allow abp to find the permission cs to generate code to pass the step 6 generate permission code?

hi

May not be enough, and other services may get a table not found error. You'd better change this in all projects that reference or indirectly reference to AbpAuditLoggingEntityFrameworkCoreModule

hi, could you provide some examples of the implementation? I am not sure where and how to add this

hi

You can change this static variable in Program.cs of all projects

AbpAuditLoggingDbProperties.DbSchema = "xxx" 

As I am using the microservice templeate, only HttpApi.Host contains the program.cs, add the static variable in here in enough?

UseAuditing()

hi, yes I have added this configuration and I found the log is actually inserted into the table with schema dbo dbo.[AbpAuditLogs] dbo.[AbpAuditLogActions] dbo.[AbpEntityChanges] dbo.[AbpEntityPropertyChanges]

Can I customize the schema of these tables? who to override AbpCommonDbProperties?

options.UseSqlServer();

Thank you so much. It resolved the error. However, when doing CRUD of the app service function, there is no record inserted to the AuditLog related tables. What else do I need to configure?

hi

Do you depend on the AbpAuditLoggingEntityFrameworkCoreModule on the EntityFrameworkCore layer?

Yes.

[DependsOn(
    typeof(AbpEntityFrameworkCoreSqlServerModule),
    typeof(AbpEntityFrameworkCoreModule),
    typeof(AbpAuditLoggingEntityFrameworkCoreModule)
)]


In ConfigureServices

Configure< AbpDbContextOptions>(options =>
{
    options.Configure< MyServiceDbContext>(c =>
    {
        c.UseSqlServer(b =>
        {
            b.MigrationsHistoryTable("__MyService_Migrations", MyServiceDbProperties.DbSchema);
        });
    });
});
Showing 1 to 10 of 25 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35