Open Closed

Volo.Authorization:010001 #2937


User avatar
0
zangwanyu created

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: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  •  2022-04-19 15:12:21.035 +08:00 [INF] Request starting HTTP/1.1 GET [https://172.16.10.210:44388/api/identity-server/claim-types?api-version=1.0](https://172.16.10.210:44388/api/identity-server/claim-types?api-version=1.0) \- 0
    2022-04-19 15:12:21.045 +08:00 [INF] Request starting HTTP/1.1 GET [https://172.16.10.210:44388/api/identity-server/identity-resources?Sorting=&SkipCount=0&MaxResultCount=10&api-version=1.0](https://172.16.10.210:44388/api/identity-server/identity-resources?Sorting=&SkipCount=0&MaxResultCount=10&api-version=1.0) \- 0
    2022-04-19 15:12:21.046 +08:00 [INF] Executing endpoint 'Volo.Abp.IdentityServer.IdentityServerClaimTypesController.GetListAsync (Volo.Abp.IdentityServer.HttpApi)'
    2022-04-19 15:12:21.049 +08:00 [INF] Executing endpoint 'Volo.Abp.IdentityServer.IdentityResourcesController.GetListAsync (Volo.Abp.IdentityServer.HttpApi)'
    2022-04-19 15:12:21.051 +08:00 [INF] Route matched with {controller = "ClaimTypes", area = "identityServer", action = "GetList"}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[Volo.Abp.IdentityServer.ClaimType.Dtos.IdentityClaimTypeDto]] GetListAsync() on controller Volo.Abp.IdentityServer.IdentityServerClaimTypesController (Volo.Abp.IdentityServer.HttpApi).
    2022-04-19 15:12:21.058 +08:00 [INF] Route matched with {controller = "IdentityResources", area = "identityServer", action = "GetList"}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto]] GetListAsync(Volo.Abp.IdentityServer.IdentityResource.Dtos.GetIdentityResourceListInput) on controller Volo.Abp.IdentityServer.IdentityResourcesController (Volo.Abp.IdentityServer.HttpApi).
    2022-04-19 15:12:21.173 +08:00 [INF] Authorization failed. These requirements were not met:
    PermissionRequirement: IdentityServer.IdentityResource
    2022-04-19 15:12:21.187 +08:00 [WRN] ---------- RemoteServiceErrorInfo ----------
    {
    "code": "Volo.Authorization:010001",
    "message": "授权失败! 提供的策略尚未授予.",
    "details": null,
    "data": {},
    "validationErrors": null
    }
    Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.
    at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)
    at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context)
    at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation)
    at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
    at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 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.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) 
    at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) 
    at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.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 lambda\_method1824(Closure , Object )    
    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft\.AspNetCore\.Mvc\.Infrastructure\.ControllerActionInvoker\.g\_\_Awaited\|12\_0\(ControllerActionInvoker invoker\, ValueTask`1 actionResultValueTask) 
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) 
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- 
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 
    2022-04-19 15:12:21.187 +08:00 [WRN] Code:Volo.Authorization:010001 
    2022-04-19 15:12:21.188 +08:00 [INF] AuthenticationScheme: Bearer was challenged. 
    2022-04-19 15:12:21.188 +08:00 [INF] Executed action Volo.Abp.IdentityServer.IdentityResourcesController.GetListAsync (Volo.Abp.IdentityServer.HttpApi) in 130.1956ms 
    2022-04-19 15:12:21.188 +08:00 [INF] Executed endpoint 'Volo.Abp.IdentityServer.IdentityResourcesController.GetListAsync (Volo.Abp.IdentityServer.HttpApi)' 
    2022-04-19 15:12:21.333 +08:00 [INF] Request finished HTTP/1.1 GET https://172.16.10.210:44388/api/identity-server/identity-resources?Sorting=&SkipCount=0&MaxResultCount=10&api-version=1.0 - 0 - 401 - - 287.8985ms        
    2022-04-19 15:12:21.755 +08:00 [INF] Executing ObjectResult, writing value of type 'System.Collections.Generic.List`1[[Volo.Abp.IdentityServer.ClaimType.Dtos.IdentityClaimTypeDto, Volo.Abp.IdentityServer.Application.Contracts, Version=5.2.0.0, Culture=neutral, PublicKeyToken=null]]'.
    2022-04-19 15:12:21.766 +08:00 [INF] Executed action Volo.Abp.IdentityServer.IdentityServerClaimTypesController.GetListAsync (Volo.Abp.IdentityServer.HttpApi) in 714.2628ms
    2022-04-19 15:12:21.767 +08:00 [INF] Executed endpoint 'Volo.Abp.IdentityServer.IdentityServerClaimTypesController.GetListAsync (Volo.Abp.IdentityServer.HttpApi)'
    2022-04-19 15:12:21.769 +08:00 [INF] Request finished HTTP/1.1 GET [https://172.16.10.210:44388/api/identity-server/claim-types?api-version=1.0](https://172.16.10.210:44388/api/identity-server/claim-types?api-version=1.0) \- 0 \- 200 \- application/json;\+charset=utf\-8 734\.3673ms
    
    
  • Steps to reproduce the issue:"

I build a MicroService Templete and deploy it on "windows server 2019", i get the error in HttpApi.Host logs when i call related page.

But it worked well on my "windows 10" equipment.

Is there any config i ignore or environment difference?


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

    Hi,

    How do I reproduce the problem, can you provide steps? thanks.

  • User Avatar
    0
    zangwanyu created

    1, I create microservice temeplate with abp suite 2, Publish it with dotnet publish, and get Application below. 3, Set up docker and DbMigrator 4, Add authserver.pfx 5, Deploy it on iis 6, open blazor 7, login 8,select an item and some error exist 9, i checked log and get the code Volo.Authorization:010001

    it happened when i deploy it on windows server 2019. but with the same step it worked well on my personal equipment.

  • User Avatar
    0
    zangwanyu created

    i tried it with swagger, it successed.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi.

    Can you check this? : https://support.abp.io/QA/Questions/1999/Blazor-Server-App-deploy-on-IIS-Get-Authorization-Error-after-sigin

  • User Avatar
    0
    zangwanyu created

    Hi.

    Can you check this? : https://support.abp.io/QA/Questions/1999/Blazor-Server-App-deploy-on-IIS-Get-Authorization-Error-after-sigin

    it works well. Thank you very much.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19