Thank you for your reply.
As mentioned earlier, I am working on an ABP (v8.3.4) Tiered application, and I need to connect it to another ABP (v8.3.4) Single-layer application hosted on my local IIS at the address: https://10.50.1.39:444/.
Currently, the connection is established using an HttpClient request, where I generate an access token using the following parameters: ClientId, ClientSecret, Scope, GrantType, UserName, and Password.
The main goal is to access the APIs of the client application (https://10.50.1.39:444/) from my server (Tiered) application.
As you mentioned, I have created client proxies in the HttpApi.Client project. And the structure looks like below:
Additionally, I have implemented the same AppServices in both applications, allowing them to operate in a server-client architecture and enabling seamless communication and functionality sharing between the two. However, I am not getting the expected output. Is there anything I might have missed in the configuration or setup? Also, is it possible to achieve the same result using Client Proxies alone, or is additional configuration required?
Dear,
I haven’t received a response yet, and I wanted to kindly check if there is any update or if additional information is required from my side. Please let me know the status at your earliest convenience, as this issue is affecting our development timeline.
Hi,
Here is my first findings:
Client Proxies is used for sending request by using AppService interfaces from Application.Contracts project they tehy should be generated in HttpApi.Client project. In case of need, you'll need to reference HttpApi.Client project of the related project.
When you generate them in the application layer, it replaces the original implementation of the interfaces.
Can you explain this in detail? Also, what changes can I make to this project?
Can you send a sample project that reproduces problem to my E-mail address with this issue number?
enis.necipoglu@volosoft.com
https://we.tl/t-Q0QHOMB27Y
Can you check your application logs? There should be log that indicates which action fails for authentication. Then we can take action accordingly
Application log :
2025-05-07 15:34:51.830 +05:30 [INF] Request starting HTTP/2 GET https://localhost:44393/api/app/branches-client-proxy/10 - null null 2025-05-07 15:34:51.832 +05:30 [INF] Executing endpoint 'QueuingSystem.Branches.BranchesClientProxy.GetAsync (********App.Application)' 2025-05-07 15:34:51.834 +05:30 [INF] Route matched with {action = "Get", controller = "BranchesClientProxy", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[QueuingSystem.Branches.BranchDto] GetAsync(Int32) on controller QueuingSystem.Branches.BranchesClientProxy (********App.Application). 2025-05-07 15:34:52.100 +05:30 [INF] Start processing HTTP request GET https://10.50.1.39:444/api/app/branches/10?api-version=1.0 2025-05-07 15:34:52.100 +05:30 [INF] Sending HTTP request GET https://10.50.1.39:444/api/app/branches/10?api-version=1.0 2025-05-07 15:34:52.197 +05:30 [INF] Received HTTP response headers after 97.5304ms - 401 2025-05-07 15:34:52.197 +05:30 [INF] End processing HTTP request after 97.708ms - 401 2025-05-07 15:34:52.209 +05:30 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": "Unauthorized", "message": "Unauthorized", "details": null, "data": null, "validationErrors": null }
2025-05-07 15:34:52.209 +05:30 [ERR] Unauthorized
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.ClientProxying.ClientProxyBase
1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
at QueuingSystem.Branches.BranchesClientProxy.GetAsync(Int32 id) in F:\CodeBox\QueuingSystemNew**********App\src**********App.Application\ClientProxies\QueuingSystem\Branches\BranchesClientProxy.Generated.cs:line 40
at lambda_method3807(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.
I am working on an ABP-based tiered application (ABP v8.3.4) and facing an issue while testing client proxies through Swagger UI. I generated the client proxy using a local IIS app with the URL https://10.50.1.39:444/ (a non-tiered, single-layered ABP application).
Whenever I try to call an API via the client proxies, I receive a 401 Unauthorized error. However, API methods decorated with the [AllowAnonymous] attribute are working fine and returning the expected values.
I referred to the following documentation for client proxy generation:
https://abp.io/docs/8.0/API/Static-CSharp-API-Clients
and generated the client proxies in the Application project of the tiered application.
Here I am attaching the request and response.
Hi, if you want to create a custom component and add it to the settings page, you can follow https://docs.abp.io/en/abp/latest/Modules/Setting-Management#create-a-setting-view-component this documentation.
You need to define a view component and then, add it in your
*SettingPageContributor
class as described in the documentation.Hi, How can I save and get those values? using ISettingManager ?
You can use the
ISettingProvider
to get the value of a setting. It's recommended to use it to read the setting values because it implements caching.You can use the
ISettingManager
to set a setting.Hi, From where I write this code , I mean save and get because I just created as you mentioned in the previous email and done some html components as in the attachment.Can you please describe me the steps involved? because we are using abp Single layer project.
You need to write your code in the related view component class. I had written an article to add a setting group, which you can found at https://community.abp.io/posts/how-to-hide-abp-related-endpoints-on-swagger-ui-mb2w01fe
You can check it for all related steps. Regards.
Hi, Getting this error wile saving settings -"Volo.Abp.AbpException: Undefined setting: BranchSettings.IsServer"
Hi, if you want to create a custom component and add it to the settings page, you can follow https://docs.abp.io/en/abp/latest/Modules/Setting-Management#create-a-setting-view-component this documentation.
You need to define a view component and then, add it in your
*SettingPageContributor
class as described in the documentation.Hi, How can I save and get those values? using ISettingManager ?
You can use the
ISettingProvider
to get the value of a setting. It's recommended to use it to read the setting values because it implements caching.You can use the
ISettingManager
to set a setting.
Hi, From where I write this code , I mean save and get because I just created as you mentioned in the previous email and done some html components as in the attachment.Can you please describe me the steps involved? because we are using abp Single layer project.
Hi, if you want to create a custom component and add it to the settings page, you can follow https://docs.abp.io/en/abp/latest/Modules/Setting-Management#create-a-setting-view-component this documentation.
You need to define a view component and then, add it in your
*SettingPageContributor
class as described in the documentation.
Hi, How can I save and get those values? using ISettingManager ?
We need your support in creating a custom area for certain branch settings within Settings. Specifically, we need to add a custom tab labeled "Branch Settings" under the "Identity Management" tab as in the image attached, where we can add and store some values. Can you please assist us with this? It is very urgent.