Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
If you're creating a bug/problem report, please include followings:
- ABP Framework version: v5.2.0
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- [21:59:05 INF] Request starting HTTP/2 GET https://localhost:44376/AbpPermissionManagement/PermissionManagementModal?providerName=C&providerKey=Shipwell_App&providerKeyDisplayName=Shipwell_App - -
[21:59:05 INF] Executing endpoint '/AbpPermissionManagement/PermissionManagementModal'
[21:59:05 INF] Route matched with {page = "/AbpPermissionManagement/PermissionManagementModal", area = "", action = "", controller = ""}. Executing page /AbpPermissionManagement/PermissionManagementModal
[21:59:05 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[21:59:05 INF] Executing handler method Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal.OnGetAsync - ModelState is Valid
[21:59:05 ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {},
"validationErrors": null
}
[21:59:05 ERR] No policy defined to get/set permissions for the provider 'C'. Use PermissionManagementOptions to map the policy.
Volo.Abp.AbpException: No policy defined to get/set permissions for the provider 'C'. Use PermissionManagementOptions to map the policy.
at Volo.Abp.PermissionManagement.PermissionAppService.CheckProviderPolicy(String providerName)
at Volo.Abp.PermissionManagement.PermissionAppService.GetAsync(String providerName, String providerKey)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal.OnGetAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() [21:59:05 INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. [21:59:05 INF] Executed page /AbpPermissionManagement/PermissionManagementModal in 128.6614ms [21:59:05 INF] Executed endpoint '/AbpPermissionManagement/PermissionManagementModal' - Steps to reproduce the issue:"
- Create a new nolayers solution and run dbmigrator
- Create an IdentityServer client, try to view the permissions for the client, the above error occurs and nothing happens on the frontend.
7 Answer(s)
-
0
hi
Try to depens
AbpPermissionManagementDomainIdentityServerModule
-
0
Yes this worked, should this be part of the standard template ?
-
0
We fixed this, Other templates won't be affected.
-
0
Thanks. In the snippet below, the template also seems to be missing the automapper module registration
private void ConfigureAutoMapper(IServiceCollection services) { services.AddAutoMapperObjectMapper<MyModule>(); // This line seems to be missing too Configure<AbpAutoMapperOptions>(options => { /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. * See AutoMapper's documentation to learn what it is: * https://docs.automapper.org/en/stable/Configuration-validation.html */ options.AddMaps<MyModule>(/* validate: true */); }); }
Can you confirm?
-
0
I will update the templates Thanks.
-
0
maliming, I also see other problems with the template. I've compared against standard app template.
In standard app template:
- Generate fresh template with abp new prodrelease -t app
- run dbmigrator
- Set ASPNETCORE_ENVIRONMENT to Production
- Add an entry to en.json localization
- Login to frontend, localization content is fine.
- Validate by calling /api/abp/application-configuration you can see the new entry under prodrelease node of localization
In nolayer
- Generate fresh template with abp new prodrelease -t app
- run dbmigrator
- Set ASPNETCORE_ENVIRONMENT to Production
- Add an entry to en.json localization
- Login to frontend, localization content from json in local project is not fine, you see the Welcome_Title instead of the localized text
- Validate by calling /api/abp/application-configuration you can not see the new nor any project specific entry under prodrelease node of localization . This issue also seems to affect other embedded content, like for example if you create a new settings component to have custom settings, this content doesnt get loaded in Production build unless you copy the Components folder to the bin folder where the production build is generated.
-
0