Activities of "Talal"

Can you explain / example; how to call the service directly from Web code-behind without using the API?

I will look into using Angular.

Thank you

I do not believe using an App service is "Accessing the database directly" I need a modern application where I do not fuse the Web and API together. these 2 must be separated.

I should be able to make the WEB project dumb.

the JWT token is not really used for API calls instead the Web is tightly coupled with the web.

The separation between:

  • API
  • Web
  • and Auth server

seems wrong.

Why do I have to rout my service calls through API when I a using the code-behine? I should be able to use a call to the Application service directly.

Please help me understand these things:

  1. Since I have to make the API Controller inherit from the related service Interface; I feel my self forced to create an API endpoint for each App service call even if I do not intend to use them (I just leave it as unimplemented sometimes)

  2. Then in many cases and even if it's against what I want to do; whenever I inject the Interface of that service, instead of the SERVICE implementation in the Application project used, the Controller implementation is used. For example, the API is called, not the service directly when I am trying to have an action in the Web project for example when a button is clicked in behind the code (C#). It's weird that the C# app service called the CONTROLLER implementation of the Service interface instead of calling the Service directly using the Application project implementation. The image below if from the submit action of a button in WEB. It should not use the API but it is. It should use the service implementation from Application project directly instead of 2 bounces

  3. In a completely different issue: I find it odd the multi-tiered solution duplicates the /api/ functionality in the WEB url instead of the proper was of calling API url using tokens for example. I noticed that it does this to use the logged-in user auth cookie in the web app. In a tiered application, the API calls are done with JWT token and handles renewal of the tokens etc. I still can not figure out why the Web project is tightly married to the API. Something is off.

Thank you

i shared the solution with you (GDrive)

I started with MVC-Tiered Solution

Worked then followed: https://blog.antosubash.com/posts/abp-extend-tenant-with-custom-host

I am getting:

The requested service 'TestProj.TenantManagement.ICustomTenantRepository' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency..

I can not find a solution anywhere

Please help.

Showing 1 to 5 of 5 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 14, 2025, 14:54