Ends in:
7 DAYS
17 HRS
54 MIN
18 SEC
Ends in:
7 D
17 H
54 M
18 S
Open Closed

Error while creating new microservice project #8235


User avatar
0
duongdangquoc@gmail.com created
  • ABP Framework version: v8.3.1
  • UI Type: MVC
  • Database System: EF Core (SQL Server) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace: 2024-11-06 16:27:09.312 +07:00 [INF] Sending HTTP request GET http://localhost:44322/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 2024-11-06 16:27:11.207 +07:00 [INF] Received HTTP response headers after 1893.3172ms - 200 2024-11-06 16:27:11.210 +07:00 [INF] End processing HTTP request after 1908.0361ms - 200 2024-11-06 16:27:11.258 +07:00 [INF] Start processing HTTP request GET http://localhost:44322/api/abp/application-localization?CultureName=en&OnlyDynamics=True&api-version=1.0 2024-11-06 16:27:11.258 +07:00 [INF] Sending HTTP request GET http://localhost:44322/api/abp/application-localization?CultureName=en&OnlyDynamics=True&api-version=1.0 2024-11-06 16:27:11.724 +07:00 [INF] Received HTTP response headers after 466.1528ms - 200 2024-11-06 16:27:11.725 +07:00 [INF] End processing HTTP request after 467.0009ms - 200 2024-11-06 16:27:11.971 +07:00 [DBG] Get dynamic claims cache for user: 60cd42b7-b510-7522-219f-3a15c02808ce 2024-11-06 16:27:11.973 +07:00 [DBG] Refresh dynamic claims for user: 60cd42b7-b510-7522-219f-3a15c02808ce from remote service. 2024-11-06 16:27:11.975 +07:00 [INF] Start processing HTTP request POST http://localhost:44331/api/account/dynamic-claims/refresh 2024-11-06 16:27:11.975 +07:00 [INF] Sending HTTP request POST http://localhost:44331/api/account/dynamic-claims/refresh 2024-11-06 16:27:13.921 +07:00 [INF] Received HTTP response headers after 1946.4158ms - 200 2024-11-06 16:27:13.922 +07:00 [INF] End processing HTTP request after 1946.7416ms - 200 2024-11-06 16:27:13.924 +07:00 [WRN] Failed to refresh remote dynamic claims cache for user: 60cd42b7-b510-7522-219f-3a15c02808ce Volo.Abp.AbpException: Failed to refresh remote claims for user: 60cd42b7-b510-7522-219f-3a15c02808ce at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorCacheBase1.GetAsync(Guid userId, Nullable1 tenantId) at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorBase`2.ContributeAsync(AbpClaimsPrincipalContributorContext context) 2024-11-06 16:27:13.928 +07:00 [INF] Executing endpoint '/DocumentsManagement/DocumentInboxes/Index' 2024-11-06 16:27:13.942 +07:00 [INF] Route matched with {page = "/DocumentsManagement/DocumentInboxes/Index", action = "", controller = "", area = ""}. Executing page /DocumentsManagement/DocumentInboxes/Index 2024-11-06 16:27:13.944 +07:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2024-11-06 16:27:13.965 +07:00 [INF] Start processing HTTP request GET http://localhost:44322/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 2024-11-06 16:27:13.965 +07:00 [INF] Sending HTTP request GET http://localhost:44322/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 2024-11-06 16:27:14.023 +07:00 [INF] Received HTTP response headers after 58.0335ms - 200 2024-11-06 16:27:14.024 +07:00 [INF] End processing HTTP request after 58.4179ms - 200 2024-11-06 16:27:14.025 +07:00 [INF] Start processing HTTP request GET http://localhost:44322/api/abp/application-localization?CultureName=en&OnlyDynamics=True&api-version=1.0 2024-11-06 16:27:14.025 +07:00 [INF] Sending HTTP request GET http://localhost:44322/api/abp/application-localization?CultureName=en&OnlyDynamics=True&api-version=1.0 2024-11-06 16:27:14.119 +07:00 [INF] Received HTTP response headers after 93.2711ms - 200 2024-11-06 16:27:14.119 +07:00 [INF] End processing HTTP request after 93.6022ms - 200 2024-11-06 16:27:14.135 +07:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": { "ActivatorChain": "DocumentsManagement.Web.Pages.DocumentsManagement.DocumentInboxes.IndexModel" }, "validationErrors": null }

2024-11-06 16:27:14.135 +07:00 [ERR] An exception was thrown while activating DocumentsManagement.Web.Pages.DocumentsManagement.DocumentInboxes.IndexModel. Autofac.Core.DependencyResolutionException: An exception was thrown while activating DocumentsManagement.Web.Pages.DocumentsManagement.DocumentInboxes.IndexModel. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'DocumentsManagement.Web.Pages.DocumentsManagement.DocumentInboxes.IndexModel' can be invoked with the available services and parameters: Cannot resolve parameter 'DocumentsManagement.DocumentInboxes.IDocumentInboxesAppService documentInboxesAppService' of constructor 'Void .ctor(DocumentsManagement.DocumentInboxes.IDocumentInboxesAppService)'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info. at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.

2024-11-06 16:27:14.140 +07:00 [INF] Executed page /DocumentsManagement/DocumentInboxes/Index in 194.5335ms 2024-11-06 16:27:14.140 +07:00 [INF] Executed endpoint '/DocumentsManagement/DocumentInboxes/Index' 2024-11-06 16:27:14.157 +07:00 [ERR] An unhandled exception has occurred while executing the request. Autofac.Core.DependencyResolutionException: An exception was thrown while activating DocumentsManagement.Web.Pages.DocumentsManagement.DocumentInboxes.IndexModel. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'DocumentsManagement.Web.Pages.DocumentsManagement.DocumentInboxes.IndexModel' can be invoked with the available services and parameters: Cannot resolve parameter 'DocumentsManagement.DocumentInboxes.IDocumentInboxesAppService documentInboxesAppService' of constructor 'Void .ctor(DocumentsManagement.DocumentInboxes.IDocumentInboxesAppService)'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info. at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.

  • Steps to reproduce the issue: Run the application, click the Document Inboxes menu item

I am trying to create my own service (Called DocumentManagement). I created a DocumentService (microservice infrastructure) and DocumentsManagement (DDD Principle). After running the application, I am facing with 2 issues: The first one is an exception I have posted log above The second is swagger error (status code is 502) when trying to access the APIs at /swagger/index.html?urls.primaryName=Documents%20API

You can teach me what I wrong, how to does not repeat in the future. Is there any detailed documentation to implement step by step.

If the supporter is maliming, you should access my Github (Shared with you last time) and run the application.

Many thanks.


31 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share your github url again?

    Thanks.

  • User Avatar
    0
    duongdangquoc@gmail.com created

    hi

    Can you share your github url again?

    Thanks.

    I have shared, please check your email

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will check it.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please add DocumentsManagement.Application and DocumentsManagement.HttpApi to your services/documents/TSD.DOCS.DocumentsService/TSD.DOCS.DocumentsService.csproj

    You can check other services to see which module needs to depend on in DocumentsService project

  • User Avatar
    0
    duongdangquoc@gmail.com created

    I have updated the dependencies as you suggested. And still have the same issues.

    Please pull code again to check.

    Thank you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you add <ProjectReference Include="../../../services/documents-management/src/DocumentsManagement.HttpApi.Client/DocumentsManagement.HttpApi.Client.csproj" /> to apps/web project?

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Hi maliming,

    I was added and pushed to github. The UI is running but swagger does not.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the error logs of 502 error.

    Thanks.

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Hi maliming,

    There are the detailed logs:

    2024-11-07 15:14:28.369 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger/index.html?urls.primaryName=Documents%20API - null null 2024-11-07 15:14:28.371 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger/index.html?urls.primaryName=Documents%20API - 200 null text/html;charset=utf-8 2.0706ms 2024-11-07 15:14:28.772 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger-json/Documents/swagger/v1/swagger.json - null null 2024-11-07 15:14:28.773 +07:00 [INF] Executing endpoint 'DocumentsSwagger' 2024-11-07 15:14:28.774 +07:00 [INF] Proxying to http://localhost:44308/swagger/v1/swagger.json HTTP/2 RequestVersionOrLower no-streaming 2024-11-07 15:14:32.816 +07:00 [INF] "Request": An error was encountered before receiving a response. System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:44308) ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Yarp.ReverseProxy.Forwarder.HttpForwarder.SendAsync(HttpContext context, String destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig, HttpTransformer transformer, CancellationToken cancellationToken) 2024-11-07 15:14:32.816 +07:00 [INF] Executed endpoint 'DocumentsSwagger' 2024-11-07 15:14:32.816 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger-json/Documents/swagger/v1/swagger.json - 502 0 null 4043.979ms

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I think there is no website using the http://localhost:44308.

    Can you check?

    TSD.DOCS.DocumentsService is using the http://localhost:44377

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Hi maliming, I dont know why the DocumentService lauchsettings.json point to 44377 but I have changed to 44308

    And this is detailed logs after I changed port number

    2024-11-07 20:41:17.093 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger/ui/abp.js - null null 2024-11-07 20:41:17.108 +07:00 [INF] Sending file. Request path: '/swagger/ui/abp.js'. Physical path: 'N/A' 2024-11-07 20:41:17.109 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger/ui/abp.js - 200 3122 application/javascript 16.0826ms 2024-11-07 20:41:17.139 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger/ui/abp.swagger.js - null null 2024-11-07 20:41:17.139 +07:00 [INF] Sending file. Request path: '/swagger/ui/abp.swagger.js'. Physical path: 'N/A' 2024-11-07 20:41:17.140 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger/ui/abp.swagger.js - 200 4527 application/javascript 1.0109ms 2024-11-07 20:41:17.178 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger/swagger-ui-bundle.js - null null 2024-11-07 20:41:17.183 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger/swagger-ui-standalone-preset.js - null null 2024-11-07 20:41:17.183 +07:00 [INF] Sending file. Request path: '/swagger-ui-bundle.js'. Physical path: 'N/A' 2024-11-07 20:41:17.184 +07:00 [INF] Sending file. Request path: '/swagger-ui-standalone-preset.js'. Physical path: 'N/A' 2024-11-07 20:41:17.196 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger/swagger-ui-standalone-preset.js - 200 312163 text/javascript 12.9733ms 2024-11-07 20:41:17.196 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger/swagger-ui-bundle.js - 200 1061536 text/javascript 17.5968ms 2024-11-07 20:41:18.014 +07:00 [INF] Request starting HTTP/1.1 GET http://localhost:44322/swagger-json/Documents/swagger/v1/swagger.json - null null 2024-11-07 20:41:18.031 +07:00 [INF] Executing endpoint 'DocumentsSwagger' 2024-11-07 20:41:18.079 +07:00 [INF] Proxying to http://localhost:44308/swagger/v1/swagger.json HTTP/2 RequestVersionOrLower no-streaming 2024-11-07 20:41:23.013 +07:00 [INF] "Request": An error was encountered before receiving a response. System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:44308) ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Yarp.ReverseProxy.Forwarder.HttpForwarder.SendAsync(HttpContext context, String destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig, HttpTransformer transformer, CancellationToken cancellationToken) 2024-11-07 20:41:23.032 +07:00 [INF] Executed endpoint 'DocumentsSwagger' 2024-11-07 20:41:23.035 +07:00 [INF] Request finished HTTP/1.1 GET http://localhost:44322/swagger-json/Documents/swagger/v1/swagger.json - 502 0 null 5021.3847ms

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You have to add AbpAspNetCoreMvcUiMultiTenancyModule to your services\documents\TSD.DOCS.DocumentsService

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Hi maliming,

    It works correctly.

    As you know, I created two support tickets and my problem is very common, based on configure solution. The exception does not show detailed issues so I don't know how to fix it. Could you share anything with me that I can resolve in the future?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can troubleshoot problems by logs.txt

    I also learned that you didn't depend on AbpAspNetCoreMvcUiMultiTenancyModule based on logs.txt

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Yeah, thank you for your help. Can I open this ticket for some days? I may need your help when implementing functions.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The bot will close the question. But you can open it anytime if you have the same problem.

  • User Avatar
    0
    duongdangquoc@gmail.com created

    After running the application, access to /DocumentsManagement/DocumentInboxes, another AbpException, please help me what I wrong. Every request of the DocumentsServie is not found


       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(IAbpMethodInvocation invocation)
       at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at lambda_method2073(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.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You should use a static proxy in your module.

    The database name is constant.

    services\documents-management\src\DocumentsManagement.HttpApi.Client>abp generate-proxy -t csharp -url http://localhost:44308/ -m DocumentsManagement  --without-contracts
    

    Please check my changes. https://github.com/quocduong/TSD-POC-Microservice/commit/4fe28736db2143304a2231500682f2cda98da037

  • User Avatar
    0
    duongdangquoc@gmail.com created

    hi

    You should use a static proxy in your module.

    Do you have any other ways? Because our developers are working in a no-internet environment so we can not use the abp cli

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Hi maliming,

    I want to add more properties to the ICurrentUser at login time and use for every service. How can I do it?

    For example: I want to store long? NodeId & short? UserType

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Because our developers are working in a no-internet environment so we can not use the abp cli

    ABP CLI generate-proxy command doesn't need the internet.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I want to add more properties to the ICurrentUser at login time and use for every service. How can I do it?

    Can you create a new question?

    Thanks.

  • User Avatar
    0
    duongdangquoc@gmail.com created

    Hi maliming,

    I have created a new API: DocumentInboxController.cs

    [HttpGet] // [Route("getAll")]: I am trying to add this but does not success. public Task<List<DocumentInboxForViewDto>> GetAllAsync(GetDocumentInboxesInput input) { return _documentInboxesAppService.GetAllAsync(input); }

    This is the existing method: [HttpGet] public virtual Task<PagedResultDto<DocumentInboxDto>> GetListAsync(GetDocumentInboxesInput input) { return _documentInboxesAppService.GetListAsync(input); }

    When running the swagger, I got the error: Conflicting method/path combination "GET api/documents-management/document-inboxes" for actions - DocumentsManagement.DocumentInboxes.DocumentInboxController.GetAllAsync (DocumentsManagement.HttpApi),DocumentsManagement.DocumentInboxes.DocumentInboxController.GetListAsync (DocumentsManagement.HttpApi). Actions require a unique method/path combination for Swagger/OpenAPI 3.0. Use ConflictingActionsResolver as a workaround

    How can I use many APIs with the same HTTP method?

  • User Avatar
    0
    duongdangquoc@gmail.com created

    I use Route("get-All")], it works but I dont want the dash

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You have to use a different URL for the same GET actions.

    [HttpGet]
    [Route("all")]
    public Task<List<DocumentInboxForViewDto>> GetAllAsync(GetDocumentInboxesInput input)
    {
    return _documentInboxesAppService.GetAllAsync(input);
    }
    
    [HttpGet]
    public virtual Task<PagedResultDto<DocumentInboxDto>> GetListAsync(GetDocumentInboxesInput input)
    {
    return _documentInboxesAppService.GetListAsync(input);
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06