Dynamic Web API Proxies GetAll 404 ERROR

608 views Asked by At

I've created some simple application service interfaces that follow naming conventions and implement IApplicationService.

    public interface IProductAppService : IApplicationService
{
    Task<ProductDto> Get(EntityDto<int> input);
    Task<PagedResultDto<ProductDto>> GetAllProducts(GetAllProductsInput input);
    Task<IList<ProductDto>> GetAllProducts();
    Task CreateProduct(CreateUpdateProductInput input);
    Task DeleteProduct(ProductDto input);
    Task UpdateProduct(CreateUpdateProductInput input);
}

The implemented service classes are OK and working within MVC Controllers. Unfortunately, I cannot use the auto-generated proxyscripts sending POST requests to abp.services.app.[serviceName].[serviceMethod] since chrome shows up the "Failed to load resource: the server responded with a status of 404 (Not Found)" for GetALL. It seems like the script isnt generated.

I've checked script tags in masterlayout (didnt changed since template download), tried renaming methods, excluding service interfaces from proxy generation via [RemoteService(false)] one by one, read the logs in both App_data and AbpAuditLogs, but no luck.

ASP.NET MVC 5.x APB 2.3.0 MPA incl. Module Zero.

log.txt

Thanks in advance!

2

There are 2 answers

5
Alper Ebicoglu On

As far as i see everything looks OK. 404 means couldn't run GetAll method successfully. the only thing i see from the logs is missing translation records. let's start from easy step; add all the missing translations to Sportsstore xml file for your language and inform us.

0
Ivan Pavić On

In my experience problem is usually that some of your other services that implement IApplicationService has a method that contains parameter that doesn't comply with Web Api rules i.e. it has multiple complex objects, try looking at others services that implement IApplicationService or one of its other abstractions (i.e. implement AsyncCrudAppService...).