Learn More, Pay Less!
Limited Time Offer!

Activities of "sgarad"

Hello

Just wanted to follow up on this

This is kind of blocking one of our development tasks

Can we please get an update or some sort of resolution

Thanks

Hi!

Any update?

Thanks!

Hi there!

Any ideas?

Thanks!

HI!

Thanks so much for sending the LeptonX angular source! Very helpful.

It turns out, we need the source of the following packages, as well! Please send version 8.2 of the below:

@volo/abp.commercial.ng.ui @volo/abp.ng.account @volo/abp.ng.audit-logging @volo/abp.ng.chat @volo/abp.ng.file-management @volo/abp.ng.gdpr @volo/abp.ng.identity @volo/abp.ng.language-management @volo/abp.ng.openiddictpro @volo/abp.ng.saas @volo/abp.ng.text-template-management

Thanks so much!

Hi,

May I ask, are you running in development env? For development environments, the cache expiration time is 5seconds

f

Yes it's development environment but I use hosted Auth server and Identity service. Is there any way to change expiration?

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!

Showing 11 to 20 of 29 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on February 17, 2025, 05:40