- ABP Framework version: v5.2.1
- UI type:MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): Tiered
I am not able to call an ABP service directly from Javascript. It appears as if my ABP Service is not being included in the ServiceProxyScript that gets loaded. Steps to reproduce issue.
- Run the DB migrator to create DB
- Log in as admin
- Go to the dashboard page
- At the bottom of the dashboard page is a button with the caption 'Save'
- Push the Save button to call the javascript code block below.
$('#CallFunctionButton').click(function (e) { structureWeb.companyTenant().then(function (result) { console.log(result.items); }); });
4 Answer(s)
-
0
Hi,
I removed the project link because the project includes your commercial license. I also suggest you make the project private.
I will check it.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
You are using tiered project, so you need to create an
API ControllerforAppService.Like we do: https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Any chance you can note in the online documentation that if you are using a tiered project auto-api controllers (via application services) are not an option so others do not waste their time trying to get it to work?
Thanks.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
We mentioned it in the best practices document https://docs.abp.io/en/abp/latest/Best-Practices/Module-Architecture#http-layer
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)