Ends in:
7 DAYS
17 HRS
19 MIN
3 SEC
Ends in:
7 D
17 H
19 M
3 S

Activities of "sgarad"

Hi

Thanks so much for sharing. However, we still need the source from this Angular package:

@volosoft/abp.ng.theme.lepton-x

How/where can we get that source (i.e. unpackaged)? Is it on the Volosoft github? We didn't see it on the ABP github.

Thanks!

HI,

BTW, ABP will try to get the token from the cache; it won't get a new token every time. https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs#L84

Hi,

The whole point is it's not picking it from cache and generating the new one on every request. I hit the service continueously and you can see the tokens are generated for each request.

I see this tokens are even loaded in my cache but the Payload is null.

Hi liangshiwei,

Here is the code.

VendorModule:

public interface IVendorIntegrationService : IApplicationService, ITransientDependency
{
    Task<ListResultDto<VendorDto>> GetAllAsync();
}

[Authorize(VendorManagementPermissions.Vendors.Default)]
[IntegrationService]
public class VendorIntegrationService : ApplicationService,IVendorIntegrationService
{
    private readonly VendorManager _vendorManager;
    private readonly IRepository<Vendor, int> _vendorRepository;

    public VendorIntegrationService(VendorManager vendorManager, IRepository<Vendor, int> vendorRepository)
    {
        _vendorManager = vendorManager;
        _vendorRepository = vendorRepository;
    }
    [Authorize(VendorManagementPermissions.Vendors.Default)]
    public async Task<ListResultDto<VendorDto>> GetAllAsync()
    {
        var vendors = await _vendorRepository.GetListAsync();
        return new ListResultDto<VendorDto>(
            ObjectMapper.Map<List<Vendor>, List<VendorDto>>(vendors)
        );
    }
}

[IntegrationService]
public class VendorIntegrationController:IVendorIntegrationService
{
    private readonly IVendorIntegrationService _vendorIntegrationService;
    public VendorIntegrationController(IVendorIntegrationService vendorIntegrationService)
    {
        _vendorIntegrationService = vendorIntegrationService;
    }
    public Task<ListResultDto<VendorDto>> GetAllAsync()
    {
        return _vendorIntegrationService.GetAllAsync();
    }
}

VendorManagementApplicationModule:AbpModule

 private void ConfigureIntegrationServices()
 {
     Configure<AbpAspNetCoreMvcOptions>(options =>
     {
         options.ExposeIntegrationServices = true;
     });
 }

If I'm trying to access this from web-gateway I get 404 not found exception but same works from Vendor service swagger.

10/3/2024 11:18:38 PM [Information] Request starting "HTTP/1.1" "GET" "http"://"localhost:44397""""/integration-api/vendorservice/vendor""" - null null 10/3/2024 11:18:38 PM [Information] Request finished "HTTP/1.1" "GET" "http"://"localhost:44397""""/integration-api/vendorservice/vendor""" - 404 0 null 1.6004ms 10/3/2024 11:18:38 PM [Information] Request reached the end of the middleware pipeline without being handled by application code. Request path: "GET" "http"://"localhost:44397""""/integration-api/vendorservice/vendor", Response status code: 404

Accounts Payable Module:

 private readonly IVendorAppService _vendorAppService;
 private readonly IVendorIntegrationService _vendorIntegrationService;
 public SampleAppService(IVendorAppService vendorAppService, IVendorIntegrationService vendorIntegrationService)
 {
     _vendorAppService = vendorAppService;
     _vendorIntegrationService = vendorIntegrationService;
 }
 
  public async Task<ListResultDto<VendorDto>> GetVendorFromAPIntegration()
  {
      return await _vendorIntegrationService.GetAllAsync();
  }

From Accounts payable when I make request first I got 404 so I added Remoteservice configuration in appsettings.json as below.

 "RemoteServices": {
   "AbpIdentity": {
     "BaseUrl": "http://localhost:44377/"
   },
   "Default": { //This is the URL of web-gateway. Which will be used to call other services(Vendor Service).
     "BaseUrl": "http://localhost:44397/",
     "UseCurrentAccessToken": "false"
   },
   "VendorService": {
     "BaseUrl": "http://localhost:44323/",
     "RemoteName": "VendorService",
     "UseCurrentAccessToken": "true"
   }
 },

After adding this I started getting 401 unauthorized. 10/3/2024 11:25:08 PM [Information] Request starting "HTTP/1.1" "GET" "http"://"localhost:44305""""/api/ap-management/sample/vendor-from-aPIntegration""" - null null 10/3/2024 11:25:09 PM [Information] Executing endpoint '"CastandCrew.PSL.AccountsPayableManagement.Samples.SampleController.GetVendorFromAPIntegration (CastandCrew.PSL.AccountsPayableManagement.HttpApi)"' 10/3/2024 11:25:09 PM [Information] Route matched with "{area = \"accountsPayableManagement\", action = \"GetVendorFromAPIntegration\", controller = \"Sample\", page = \"\"}". Executing controller action with signature "System.Threading.Tasks.Task1[Volo.Abp.Application.Dtos.ListResultDto`1[CastandCrew.PSL.VendorManagement.Vendor.VendorDto]] GetVendorFromAPIntegration()" on controller "CastandCrew.PSL.AccountsPayableManagement.Samples.SampleController" ("CastandCrew.PSL.AccountsPayableManagement.HttpApi"). 10/3/2024 11:25:09 PM [Warning] Could not find IdentityClientConfiguration for VendorService. Either define a configuration for VendorService or set a default configuration. 10/3/2024 11:25:09 PM [Information] Start processing HTTP request "GET" "http://localhost:44323/integration-api/vendorservice/vendor?api-version=1.0" 10/3/2024 11:25:09 PM [Information] Sending HTTP request "GET" "http://localhost:44323/integration-api/vendorservice/vendor?api-version=1.0" 10/3/2024 11:25:09 PM [Information] Received HTTP response headers after 26.7839ms - 401 10/3/2024 11:25:09 PM [Information] End processing HTTP request after 27.3146ms - 401 10/3/2024 11:25:09 PM [Error] ---------- RemoteServiceErrorInfo ---------- { "code": "Unauthorized", "message": "Unauthorized", "details": null, "data": null, "validationErrors": null }

10/3/2024 11:25:09 PM [Error] Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.ThrowExceptionForResponseAsync(HttpResponseMessage response) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy1.CallRequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.CallRequestAsync[T](ClientProxyRequestContext context) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.GetResultAsync(Task task, Type resultType) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at CastandCrew.PSL.AccountsPayableManagement.Samples.SampleAppService.GetVendorFromAPIntegration() in D:\PROJECTS\PSLWEB2\psl-modules\CastandCrew.PSL.AccountsPayableManagement\src\CastandCrew.PSL.AccountsPayableManagement.Application\Samples\SampleAppService.cs:line 23 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 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.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 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.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at CastandCrew.PSL.AccountsPayableManagement.Samples.SampleController.GetVendorFromAPIntegration() in D:\PROJECTS\PSLWEB2\psl-modules\CastandCrew.PSL.AccountsPayableManagement\src\CastandCrew.PSL.AccountsPayableManagement.HttpApi\Samples\SampleController.cs:line 44 at lambda_method1762(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

10/3/2024 11:25:09 PM [Error] Code:Unauthorized 10/3/2024 11:25:09 PM [Error] Details: 10/3/2024 11:25:09 PM [Information] Executing "ObjectResult", writing value of type '"Volo.Abp.Http.RemoteServiceErrorResponse"'. 10/3/2024 11:25:09 PM [Information] Executed action "CastandCrew.PSL.AccountsPayableManagement.Samples.SampleController.GetVendorFromAPIntegration (CastandCrew.PSL.AccountsPayableManagement.HttpApi)" in 44.5462ms 10/3/2024 11:25:09 PM [Information] Executed endpoint '"CastandCrew.PSL.AccountsPayableManagement.Samples.SampleController.GetVendorFromAPIntegration (CastandCrew.PSL.AccountsPayableManagement.HttpApi)"' 10/3/2024 11:25:09 PM [Information] AUDIT LOG: [401: GET ] /api/ap-management/sample/vendor-from-aPIntegration

  • UserName - UserId : admin - 3a14dab1-0282-f76d-03ab-e4df6ead01b5
  • ClientIpAddress : ::1
  • ExecutionDuration : 46
  • Actions:
    • CastandCrew.PSL.AccountsPayableManagement.Samples.SampleAppService.GetVendorFromAPIntegration (32 ms.) {}
    • CastandCrew.PSL.AccountsPayableManagement.Samples.SampleController.GetVendorFromAPIntegration (35 ms.) {}-

10/3/2024 11:25:09 PM [Information] Request finished "HTTP/1.1" "GET" "http"://"localhost:44305""""/api/ap-management/sample/vendor-from-aPIntegration""" - 401 null "application/json; charset=utf-8" 84.3498ms

`

Hi liangshiwei,

Thanks for the quick reply. If I moved to Integration Service do I still need aa access_token while communication from service to service? When I followed intergration implemntation I gets UnAuthorized exception.

Thanks Krishna

Hi,

Can we please get some resolution on this? We have been blocked for almost a week, waiting on this to get resolved.

Thanks!

hi! yes, i have confirmed that i logged into the CLI:

% abp login-info [15:33:05 INF] You are running the second generation of the ABP CLI. If you're interested in the legacy CLI, see https://abp.io/new-cli [15:33:18 INF] Login info: Name: Surname: Username: sgarad

tried to run the "abp get-source Volo.Abp.LeptonXTheme" command again, and got some new warnings in addition to the same error:

% abp get-source Volo.Abp.LeptonXTheme [15:34:27 INF] You are running the second generation of the ABP CLI. If you're interested in the legacy CLI, see https://abp.io/new-cli [15:34:27 INF] Downloading source code of Volo.Abp.LeptonXTheme (Latest) [15:34:27 INF] Output folder: /Users/lsuh/Projects/temp/abp [15:34:35 WRN] Failed to get global nuget source: https://nuget.abp.io/<myLicenseKey>/v3/index.json [15:35:27 ERR] Downloading source code failed for: Volo.Abp.LeptonXTheme Volo.Abp.Studio.AbpStudioException: Exception of type 'Volo.Abp.Studio.AbpStudioException' was thrown. at async Task Volo.Abp.Studio.Modules.Installing.SourceCodeDownloader.
DownloadSourceCodeAsync(string moduleName, string targetFolder, string
version, bool includeNightly)
at async Task Volo.Abp.Studio.Cli.Commands.StudioGetSourceCommand.ExecuteAsync( CommandLineArgs commandLineArgs)
at async Task Volo.Abp.Studio.Cli.StudioCliService.RunInternalAsync(
CommandLineArgs commandLineArgs)
at async Task Volo.Abp.Studio.Cli.StudioCliService.RunAsync(string[] args)

Both my ABP Studio and CLI are at version 0.8.3. Same result.

What exactly is it that throws that exception?

% abp get-source Volo.Abp.LeptonXTheme
[20:05:21 INF] You are running the second generation of the ABP CLI. If you're interested in the legacy CLI, see https://abp.io/new-cli [20:05:21 INF] Downloading source code of Volo.Abp.LeptonXTheme (Latest) [20:05:21 INF] Output folder: /Users/lsuh/Projects/temp/abp [20:06:21 ERR] Downloading source code failed for: Volo.Abp.LeptonXTheme Volo.Abp.Studio.AbpStudioException: Exception of type 'Volo.Abp.Studio.AbpStudioException' was thrown. at async Task Volo.Abp.Studio.Modules.Installing.SourceCodeDownloader.
DownloadSourceCodeAsync(string moduleName, string targetFolder, string
version, bool includeNightly)
at async Task Volo.Abp.Studio.Cli.Commands.StudioGetSourceCommand.ExecuteAsync (CommandLineArgs commandLineArgs)
at async Task Volo.Abp.Studio.Cli.StudioCliService.RunInternalAsync(
CommandLineArgs commandLineArgs)
at async Task Volo.Abp.Studio.Cli.StudioCliService.RunAsync(string[] args)

Answer

Can you share the Solution Configuration? I will try to reproduce the problem.

Hi,

I don't see an option for configuration. I'm using enterprise edition.

An error occurred using the connection to database 'PSLWeb_dev3_SaasService' on server 'cm1giqldc35kxj7.caxfhp14t2hx.us-west-2.rds.amazonaws.com'. fail: Volo.Abp.RabbitMQ.RabbitMqMessageConsumer[0]

Hi,

We see all the databases have been migrated properly but still AbpPermissionGroups and AbpPermissions table are empty.. Is there any order in which services needs to starts?

Answer

Hi @sgarad

Does the problem persist after you give the missing permissions to admin on Identity Management>Roles page? or are not they present in permissions window?

Hi,

Those permissions are not available in permissions window. Those permissions groups are not created. I've attached the screenshot above in original post.

Thanks Krishna

Showing 11 to 20 of 24 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06