Fantastic 🎉 so close now 😎
If I change the endpoint on the external system side to [AllowAnonymous] , the current User is empty, but the tenant is identified. All that I need now is to set the current User information. Is their a user or admin user setting for the tenant that needs setting? Thank you This is the error on the Client Proxy side
Thanks If you look at the above comment, what am I missing to configure client proxy
Where do I set the config for this?
Configure<AbpHttpClientOptions>(options =>
{
options.HttpClientProxies.Add(typeof(ISubscriptionAppService), new HttpClientProxyConfig(typeof(ISubscriptionAppService), SaasHostRemoteServiceConsts.RemoteServiceName));
});
Yay, I had two issues.
The stack overflow was been caused by a return type Syncfusion.XlsIO.IWorksheet If I paused the AddCustomTypesToModel method every 1800 passes, http garbage collection could handle it.
The other parameter type causing the problem was a return type : MimeKit MimeMessage
Thanks, I can now run the CMD abp generate-proxy -t csharp -u https://localhost:44334/ -m Integration --without-contracts
When I call the endpoint
Guid.TryParse(id, out Guid accountSegmentId);
var result = await _accountSegmentsApiAppService.GetAsync(accountSegmentId);
I am getting the following error
2024-11-28 16:01:34.155 +02:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }
2024-11-28 16:01:34.156 +02:00 [ERR] Could not get HttpClientProxyConfig for Integration.AccountSegments.IAccountSegmentsAppService.
Volo.Abp.AbpException: Could not get HttpClientProxyConfig for Integration.AccountSegments.IAccountSegmentsAppService.
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase
1.RequestAsync[T](ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
at ClientProxies.Integration.AccountSegments.AccountSegmentClientProxy.GetAsync(Guid id) in F:\Outpost\src\Outpost.Application\ClientProxies\Integration\AccountSegments\AccountSegmentClientProxy.Generated.cs:line 35
at Outpost.Web.Pages.Testing.ItxTestModel.OnPostAsync() in F:\Outpost\src\Outpost.Web\Pages\Testing\ItxTest.cshtml.cs:line 91
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()
I have checked the following
appsettings.json
"RemoteServices": {
"ITX_Home": {
"BaseUrl": "https://localhost:44334/"
}
},
OutpostApplicationModule
[DependsOn(typeof(IntegrationApplicationModule))]
[DependsOn(
typeof(AbpHttpClientModule),
typeof(AbpVirtualFileSystemModule)
)]
public class OutpostApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Prepare for static client proxy generation
context.Services.AddStaticHttpClientProxies(
typeof(OutpostApplicationModule).Assembly,
remoteServiceConfigurationName:"ITX_Home"
);
// Include the generated app-generate-proxy.json in the virtual file system
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<OutpostApplicationModule>();
});
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<OutpostApplicationModule>();
});
}
}
class OutpostWebModule
//PreConfigureServices
PreConfigure<AbpHttpClientBuilderOptions>(options =>
{
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
{
clientBuilder.AddTransientHttpErrorPolicy(
policyBuilder => policyBuilder.WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(Math.Pow(2, i)))
);
});
});
//ConfigureServices
Configure<AbpHttpClientOptions>(options =>
{
options.HttpClientProxies.Add(typeof(ISubscriptionAppService), new HttpClientProxyConfig(typeof(ISubscriptionAppService), SaasHostRemoteServiceConsts.RemoteServiceName));
});
Any ideas?
Thanks and regards - Tony
Cool, no problem. 🎉
This is throwing an error.
Busy tracing
So, if I add the class without override, the code runs and can be debugged. No errors are thrown in the class when called from swagger.
public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApplicationConfigurationAppService
I have emailed you the json file.
When I call the abp generate-proxy -t csharp -u https://localhost:44334/ -m Integration command from Terminal CMD, the code breaks here
I hope that this is progress
Thanks Shiwei
Hi
It looks to me that I am not referencing the AbpApplicationConfigurationAppService library in the application
If I do it this way, none of the following are injected into the class
_localizationOptions;
_multiTenancyOptions;
_serviceProvider;
_abpAuthorizationPolicyProvider;
_permissionDefinitionManager;
_defaultAuthorizationPolicyProvider;
_permissionChecker;
_authorizationService;
_currentUser;
_settingProvider;
_settingDefinitionManager;
_featureDefinitionManager;
_languageProvider;
_timezoneProvider;
_abpClockOptions;
_cachedObjectExtensionsDtoService;
_options;