Hi,
I would like to report that something is not quite right with the solution template for Blazor Web App. I've created Blazor WebApp (tiered) with sample CRUD page. After that, I started application and went to Book page. Initially everything works fine, but when rendermode is InteractiveWebassembly and list of books is requested, exception is occurring every time. It seems like something is not right with the remote service configuration out of the box. My other team members are experiencing the exact same behaviour, so it should be easy to reproduce this problem on your side as well.
Thanks in advance.
- Exception message and full stack trace:
Volo.Abp.AspNetCore.Components.Web.ExceptionHandling.UserExceptionInformer[0]
Could not find remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[AbpSolution10.Books.BookDto]] GetListAsync(Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto) on the URL: https://localhost:44331
Volo.Abp.AbpException: Could not find remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[AbpSolution10.Books.BookDto]] GetListAsync(Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto) on the URL: https://localhost:44331
at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<GetActionApiDescriptionModel>d__25[[AbpSolution10.Books.IBookAppService, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<InterceptAsync>d__24[[AbpSolution10.Books.IBookAppService, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__3`1[[Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1[[AbpSolution10.Books.IBookAppService, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Http.Client, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null],[Volo.Abp.Application.Dtos.PagedResultDto`1[[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__14`1[[Volo.Abp.Application.Dtos.PagedResultDto`1[[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.<ProceedAsync>d__7[[Volo.Abp.Application.Dtos.PagedResultDto`1[[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__3`1[[Volo.Abp.Validation.ValidationInterceptor, Volo.Abp.Validation, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null],[Volo.Abp.Application.Dtos.PagedResultDto`1[[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Volo.Abp.BlazoriseUI.AbpCrudPageBase`10.<GetEntitiesAsync>d__70[[AbpSolution10.Books.IBookAppService, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Guid, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto, Volo.Abp.Ddd.Application.Contracts, Version=9.3.4.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.CreateUpdateBookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.CreateUpdateBookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.BookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.CreateUpdateBookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[AbpSolution10.Books.CreateUpdateBookDto, AbpSolution10.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()`
- Steps to reproduce the issue:
- Just create layered Blazor WebApp (Tiered) with Sample CRUD page. As soon as rendermode is InteractiveWebassembly, every attempt of reading list of books will crash. Solution was created in ABP Studio (version 1.3.2)
3 Answer(s)
-
0
The issue you are experiencing with the Blazor Web App (tiered) template and InteractiveWebAssembly render mode is related to the remote service configuration for your CRUD page. In tiered ABP solutions, especially with Blazor WebAssembly or InteractiveWebAssembly, the client-side app communicates with the backend via HTTP API endpoints. If the remote service is not properly configured or exposed, you will encounter the "Could not find remote action for method" exception.
Solution Steps
- Ensure RemoteService Attribute is Set Correctly
- For your application service (e.g.,
BookAppService
), make sure it is decorated with[RemoteService]
(or not explicitly disabled). If you use[RemoteService(IsEnabled = false)]
, the service will not be exposed to the client, causing this error. - Example:
- For your application service (e.g.,
[RemoteService] // or simply omit this if you want it enabled by default public class BookAppService : ApplicationService, IBookAppService { // ... }
Check API Controller Generation
- ABP automatically generates API controllers for application services marked as remote services. Ensure that your service interface and implementation are public and not internal.
- If you have a custom controller, ensure it is properly routed and implements the correct interface.
Verify API Endpoint Accessibility
- Start your
HttpApi.Host
project and check the Swagger UI (e.g.,https://localhost:44331/swagger
). Ensure that the endpoint for your CRUD service (e.g.,/api/app/book
) is present and accessible.
- Start your
Check AppSettings for Remote Service Configuration
- In your Blazor Web App's
appsettings.json
, ensure theRemoteService:BaseUrl
is set to the correct API host URL.
- In your Blazor Web App's
"RemoteService": { "BaseUrl": "https://localhost:44331" }
Rebuild and Restart All Projects
- After making changes, rebuild the solution and restart both the
HttpApi.Host
and Blazor Web App projects to ensure all changes are applied.
- After making changes, rebuild the solution and restart both the
Known Issue with Module Template
- There is a known issue where the module template does not set up the remote service correctly for tiered apps. If you used the module template, you may need to manually add the
[RemoteService]
attribute or check the generated code for missing configuration. - Reference: https://abp.io/support/questions/4300
- There is a known issue where the module template does not set up the remote service correctly for tiered apps. If you used the module template, you may need to manually add the
Additional Notes
- If you have both a controller and an app service, ensure that at least one is exposed as a remote service for the client to access.
- A clean and rebuild of the solution can sometimes resolve issues after upgrades or template changes (see: https://abp.io/support/questions/1735).
Sources:
- https://abp.io/support/questions/4300
- https://abp.io/support/questions/1735
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
- Ensure RemoteService Attribute is Set Correctly
-
0
hi
I will check this case.
Thanks.
-
0
hi
Please try to use
AddStaticHttpClientProxies
in your.HttpApi.Client
project,context.Services.AddStaticHttpClientProxies( typeof(AbpSolution1ApplicationContractsModule).Assembly, RemoteServiceName );
.HttpApi.Client> abp generate-proxy -t csharp -m app --url https://localhost:44332 --without-contracts
https://localhost:44332 is your api website url.
Thanks