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
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
I have updated the dependencies as you suggested. And still have the same issues.
Please pull code again to check.
Thank you.
hi
Can you share your github url again?
Thanks.
I have shared, please check your email
1.GetAsync(Guid userId, Nullable
1 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.
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.
It works as expect. Thank you so much.
I just sent the invitation, please check your email. Main project is TSD.DOCS.AdminCategoryService in \services\admin\category
If needed, I can share all solutions with you by adding you to my Github repo.