Hi There,
Is there any update on this. It's been since quite long time I'm waiting for the reply.
Thanks Krishna
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!
We are seeing the error below in our devtools console when attempting to create a new Tenant:
We looked at the source and the error suggests that this.connectionStringsRef (on line 1126) is undefined:
We looked at the source of tenants.component.ts to see how connectionStringsRef was declared:
Further up in that tenants.component.ts file, we noticed the reference to that component:
Later on in the very same tenants.component.ts file, we saw this:
We had to replace that ConnectStringsComponent file. Our changes (in the new replacement component) showed up just fine in the browser. We followed the instructions in the official ABP.io docs, as seen in our modifications to app.component.ts below:
We tried calling this.replaceable.components.add in both the constructor and in ngOnInit (in AppComponent). It made no difference. We still ended up with the same error.
Below is the screen shot of how we added our new replaced component in AppModule, per instructions in the docs:
So, the question is, did we miss something? We did not modify tenants.component.ts; we didn't think we needed to, since we followed the instructions in the docs. So how is tenants.component.ts supposed to know to use the "new-connection-strings.component.ts" file instead of the old "connection-strings.component.ts" file?
Or are we supposed to modify tenants.component.ts as well? If so, does that mean every component that refers to a "replaced" component, somewhere in the dependency tree, needs to be updated?
Please advise, as we are blocked by this.
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
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.Task
1[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.ClientProxyBase
1.RequestAsync(ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy
1.CallRequestAsync[T](ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.CallRequestAsync[T](ClientProxyRequestContext context) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor
1.GetResultAsync(Task task, Type resultType)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.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 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.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, 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, 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.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.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.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.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask
1 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
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
`