Activities of "Neozzz"

Hi, I've tried everything you've said. This is the error I am getting now. I logged in using user account in my docker file.

Interop+Crypto+OpenSslCryptographicException: error:2006D002:BIO routines:BIO_new_file:system lib at Interop.Crypto.CheckValidOpenSslHandle(SafeHandle handle) at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromFile(String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)

Below is my docker run command:

docker run -d -it -p 5000:80 -p 44338:44338 -e ASPNETCORE_URLS="https://+:44338;http://+" -e ASPNETCORE_HTTPS_PORT=44338 -v $env:USERPROFILE/.aspnet/https:/users/appuser/.aspnet/https/ -v $env:USERPROFILE/AppData/Roaming/Microsoft/UserSecrets/:/users/appuser/.microsoft/usersecrets -e ASPNETCORE_Kestrel__Certificates__Default__Password=password -e ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.aspnet/https/aspnetapp.pfx <image name>

I have tried same method on .net 5.0 application and I was able to successfully use https. When using abp project I am getting this error. Please let me know what to do or if you need further information.

Hi I am getting this error from the container logs: 2021-08-16 07:45:09.249 +00:00 [ERR] ABP-LIC-0008 - License check failed for 'Volo.Saas.Domain-v4.3.0.0'. You need to log in using the command abp login <username>.

I have done the following in the dockerfile COPY ["$env:userprofile.abp\cli\access-token.bin", "~/.abp/cli/"] COPY ["$env:userprofile.abp\cli\access-token.bin", "/root/.abp/cli/"] COPY ["$env:userprofile.\AppData\Local\Temp\AbpLicense.bin", "~/.abp/cli/"]

I have to run the project as development. Even though I've copied the files as mentioned in other support threads I am still getting this error. Is there any other way to mitigate this issue while running this project as development.

I ran the docker image with the following command.

docker run -d -p 8000:80 -p 44338:44338 -p 443:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=44338 -e ASPNETCORE_ENVIRONMENT=Production -v C:/Users/neozzz/AppData/Roaming/Microsoft/UserSecrets/:/root/.microsoft/usersecrets -v ${HOME}/.aspnet/https:/root/.aspnet/https/ <myImageName>

I am still getting errors and now its saying:

System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action1 configureOptions) at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable1 listenOptions, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at ZW.OrgSvc.Program.Main(String[] args) in C:\Users\naeem\Desktop\WorkSpace\Repos\ZWApplications\OrganizationService\aspnet-core\src\ZW.OrgSvc.HttpApi.Host\Program.cs:line 31

Please find the full error logs here.

hi

Does the AbpLicenseCode exists in your appsettings.json

Yes. Its there in the appsettings.json. It's also there in the appsettings.json inside the publish folder which we dockerized. There is an empty file called appsettings.Development.json. Should we add anything there? Tx

Hi I commented the : ConfigureVirtualFileSystem(context); in the httpapihostmodule.cs file.

Now am getting this error: 2021-07-29 20:05:51.090 +00:00 [ERR] ABP-LIC-0008 - License check failed for 'Volo.Abp.LanguageManagement.HttpApi-v4.3.0.0'. You need to log in using the command abp login <username>. For more information, contact to license@abp.io. 2021-07-29 20:05:51.113 +00:00 [INF] Application is shutting down... 2021-07-29 20:05:51.368 +00:00 [INF] Starting IdentityServer4 version 4.1.1+cebd52f5bc61bdefc262fd20739d4d087c6f961f 2021-07-29 20:05:52.382 +00:00 [INF] Using the default authentication scheme Identity.Application for IdentityServer 2021-07-29 20:05:53.117 +00:00 [INF] Initialized all ABP modules. 2021-07-29 20:05:53.161 +00:00 [FTL] Unable to start Kestrel. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication1 application, CancellationToken cancellationToken)`

Should we login to abp for running the kestrel application?

Please check the onedrive link in the beginning. it contains a file called error.txT which I took from the container.

Hi, Link: https://commitme-my.sharepoint.com/:t:/g/personal/naeem_comm-it_com_sa/Edvj633iLi5CvKauSPRKoX0BaSFTjI_HdXuPBlY0I62Wqw?e=Q4vovS

I compiled the application using the command: dotnet publish -c Release

Then containerized it using the following Dockerfile: FROM mcr.microsoft.com/dotnet/aspnet:5.0 COPY bin/Release/net5.0/publish/ App/ WORKDIR /App ENTRYPOINT ["dotnet", "AppName.HttpApi.Host.dll"]

Then I followed the instructions as given by the link shared earlier: "You can check microsoft documentation about Developing ASP.NET Core Applications with Docker over HTTPS."

The container exits automatically. Then I followed the steps mentioned in this thread and obtained the log file. I've attached the log file. The following is a small snippet.

[FTL] Application startup exception Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.AspNetCore.AbpAspNetCoreModule, Volo.Abp.AspNetCore, Version=4.3.0.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.VirtualFileSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvider.. See the inner exception for details. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> ....

Please let me know what might be causing the issue.

Thank you.

What we're trying to do here is to use gridfs for storing files. And for that we dont require creating an entity. So there are some definitions we've to make at the several layers:

For example, usually in the case of having an entity: public class MongoDbFileRepository :MongoDbRepository<BookStoreMongoDbContext, Author, Guid>, IFileRepository

In our case we just used: public class MongoDbFileRepository : IFileRepository

Could this be the cause of the dependency injection error?

Is there any reference or example where we just capture data from from api and not use any entities?

Please help.

Thank you.

Hi @Neozzz, as stated here if you add an app service method named GetDocumentAsync it will calculates as /api/app/file/{id}/document but if you would specified it like GetAsync it would have transformed it into /api/app/file/{id}.

  • If you want to customize your route calculation, you can check here.

Hi,

Thank you for the reply. I am trying to submit a file from the swaffer ui to my appservice:

public async Task<ObjectId> UploadImageAsync(IFormFile data)
        {
           bla bla
            return uploadSuccess;
        }

But I get the following warning: System.IO.InvalidDataException: Missing content-type boundary.

Full log on request:

2021-06-29 09:57:29.330 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:57:29.331 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:57:29.331 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:57:29.331 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:57:29.349 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
2021-06-29 09:57:29.350 +04:00 [INF] Executing endpoint 'Health checks'
2021-06-29 09:57:29.571 +04:00 [INF] Executed endpoint 'Health checks'
2021-06-29 09:57:29.572 +04:00 [INF] Request finished HTTP/1.1 GET https://localhost:44354/health-status - - - 200 - application/json 223.4216ms
2021-06-29 09:57:29.590 +04:00 [INF] Saved 2 entities to in-memory store.
2021-06-29 09:57:29.590 +04:00 [DBG] HealthReportCollector has completed.
2021-06-29 09:57:29.590 +04:00 [DBG] HealthCheck collector HostedService executed successfully.
2021-06-29 09:57:39.604 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:57:39.605 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:57:39.605 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:57:39.605 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:57:39.625 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
] Received HTTP response headers after 268.7558ms - 200
2021-06-29 09:57:39.874 +04:00 [INF] End processing HTTP request after 268.9796ms - 200
2021-06-29 09:57:39.875 +04:00 [DBG] HealthReportCollector - health report execution history saved.
2021-06-29 09:57:39.875 +04:00 [DBG] HealthReport history already exists and is in the same state, updating the values.
2021-06-29 09:57:39.875 +04:00 [INF] Saved 2 entities to in-memory store.
2021-06-29 09:57:39.876 +04:00 [DBG] HealthReportCollector has completed.
2021-06-29 09:57:39.876 +04:00 [DBG] HealthCheck collector HostedService executed successfully.
2021-06-29 09:57:49.877 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:57:49.877 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:57:49.877 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:57:49.877 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:57:49.902 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
2021-06-29 09:57:49.903 +04:00 [INF] Executing endpoint 'Health checks'
2021-06-29 09:57:50.121 +04:00 [INF] Executed endpoint 'Health checks'
2021-06-29 09:57:50.122 +04:00 [INF] Request finished HTTP/1.1 GET https://localhost:44354/health-status - - - 200 - application/json 220.8458ms
2021-06-29 09:57:50.137 +04:00 [INF] Received HTTP response headers after 259.7043ms - 200
2021-06-29 09:57:50.137 +04:00 [INF] End processing HTTP request after 259.8401ms - 200
2021-06-29 09:57:50.138 +04:00 [DBG] HealthReportCollector - health report execution history saved.
2021-06-29 09:57:50.138 +04:00 [DBG] HealthReport history already exists and is in the same state, updating the values.
2021-06-29 09:57:50.138 +04:00 [INF] Saved 2 entities to in-memory store.
2021-06-29 09:57:50.138 +04:00 [DBG] HealthReportCollector has completed.
2021-06-29 09:57:50.138 +04:00 [DBG] HealthCheck collector HostedService executed successfully.
2021-06-29 09:58:00.148 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:58:00.149 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:58:00.149 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:00.149 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:00.167 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
2021-06-29 09:58:00.168 +04:00 [INF] Executing endpoint 'Health checks'
2021-06-29 09:58:00.388 +04:00 [INF] Executed endpoint 'Health checks'
<**trunc**>
2021-06-29 09:58:10.679 +04:00 [INF] Saved 2 entities to in-memory store.
2021-06-29 09:58:10.679 +04:00 [DBG] HealthReportCollector has completed.
2021-06-29 09:58:10.679 +04:00 [DBG] HealthCheck collector HostedService executed successfully.
2021-06-29 09:58:20.695 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:58:20.695 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:58:20.695 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:20.695 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:20.714 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
2021-06-29 09:58:20.716 +04:00 [INF] Executing endpoint 'Health checks'
2021-06-29 09:58:20.935 +04:00 [INF] Executed endpoint 'Health checks'
2021-06-29 09:58:20.935 +04:00 [INF] Request finished HTTP/1.1 GET https://localhost:44354/health-status - - - 200 - application/json 221.4764ms
2021-06-29 09:58:20.954 +04:00 [INF] Received HTTP response headers after 258.3474ms - 200
2021-06-29 09:58:20.954 +04:00 [INF] End processing HTTP request after 258.4655ms - 200
2021-06-29 09:58:20.954 +04:00 [DBG] HealthReportCollector - health report execution history saved.
2021-06-29 09:58:20.955 +04:00 [DBG] HealthReport history already exists and is in the same state, updating the values.
2021-06-29 09:58:20.955 +04:00 [INF] Saved 2 entities to in-memory store.
2021-06-29 09:58:20.955 +04:00 [DBG] HealthReportCollector has completed.
2021-06-29 09:58:20.955 +04:00 [DBG] HealthCheck collector HostedService executed successfully.
2021-06-29 09:58:30.986 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:58:30.986 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:58:30.987 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:30.987 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:31.007 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
2021-06-29 09:58:31.008 +04:00 [INF] Executing endpoint 'Health checks'
2021-06-29 09:58:31.230 +04:00 [INF] Executed endpoint 'Health checks'
2021-06-29 09:58:31.231 +04:00 [INF] Request finished HTTP/1.1 GET https://localhost:44354/health-status - - - 200 - application/json 223.5154ms
2021-06-29 09:58:31.247 +04:00 [INF] Received HTTP response headers after 260.0129ms - 200
2021-06-29 09:58:31.247 +04:00 [INF] End processing HTTP request after 260.1302ms - 200
2021-06-29 09:58:31.247 +04:00 [DBG] HealthReportCollector - health report execution history saved.
2021-06-29 09:58:31.248 +04:00 [DBG] HealthReport history already exists and is in the same state, updating the values.
2021-06-29 09:58:31.248 +04:00 [INF] Saved 2 entities to in-memory store.
2021-06-29 09:58:31.248 +04:00 [DBG] HealthReportCollector has completed.
2021-06-29 09:58:31.248 +04:00 [DBG] HealthCheck collector HostedService executed successfully.
2021-06-29 09:58:39.011 +04:00 [INF] Request starting HTTP/2 POST https://localhost:44354/api/app/file/upload-image multipart/form-data;+boundary=----WebKitFormBoundary1Ka0lYzBxmaVzIHU 77459
2021-06-29 09:58:39.011 +04:00 [INF] CORS policy execution successful.
2021-06-29 09:58:39.027 +04:00 [INF] Executing endpoint 'ZW.FileSvc.Files.FileAppService.UploadImageAsync (ZW.FileSvc.Application)'
2021-06-29 09:58:39.027 +04:00 [INF] Route matched with {action = "UploadImage", controller = "File", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[MongoDB.Bson.ObjectId] UploadImageAsync(Microsoft.AspNetCore.Http.IFormFile) on controller ZW.FileSvc.Files.FileAppService (ZW.FileSvc.Application).
2021-06-29 09:58:39.464 +04:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "An internal error occurred during your request!",
  "details": null,
  "data": {
    "ActivatorChain": "Castle.Proxies.FileAppServiceProxy"
  },
  "validationErrors": null
}

2021-06-29 09:58:39.464 +04:00 [ERR] An exception was thrown while activating Castle.Proxies.FileAppServiceProxy.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.FileAppServiceProxy.
 ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Castle.Proxies.FileAppServiceProxy' can be invoked with the available services and parameters:
Cannot resolve parameter 'ZW.FileSvc.Files.IFileRepository fileRepository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], ZW.FileSvc.Files.IFileRepository)'.
   at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.&lt;ConfigurePipeline&gt;b__11_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- End of inner exception stack trace ---
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
 &lt;**trunc**&gt;
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.&lt;&gt;c__DisplayClass5_0.&lt;CreateControllerFactory&gt;g__CreateController|0(ControllerContext controllerContext)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2021-06-29 09:58:39.464 +04:00 [ERR] ---------- Exception Data ----------
ActivatorChain = Castle.Proxies.FileAppServiceProxy

2021-06-29 09:58:39.465 +04:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
2021-06-29 09:58:39.465 +04:00 [INF] Executed action ZW.FileSvc.Files.FileAppService.UploadImageAsync (ZW.FileSvc.Application) in 437.8322ms
2021-06-29 09:58:39.465 +04:00 [INF] Executed endpoint 'ZW.FileSvc.Files.FileAppService.UploadImageAsync (ZW.FileSvc.Application)'
2021-06-29 09:58:39.686 +04:00 [INF] Request finished HTTP/2 POST https://localhost:44354/api/app/file/upload-image multipart/form-data;+boundary=----WebKitFormBoundary1Ka0lYzBxmaVzIHU 77459 - 500 - application/json;+charset=utf-8 675.3065ms
2021-06-29 09:58:41.266 +04:00 [DBG] Executing HealthCheck collector HostedService.
2021-06-29 09:58:41.266 +04:00 [INF] Entity Framework Core 5.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory' with options: StoreName=HealthChecksUI 
2021-06-29 09:58:41.267 +04:00 [INF] Start processing HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:41.267 +04:00 [INF] Sending HTTP request GET "https://localhost:44354/health-status"
2021-06-29 09:58:41.286 +04:00 [INF] Request starting HTTP/1.1 GET https://localhost:44354/health-status - -
2021-06-29 09:58:41.287 +04:00 [INF] Executing endpoint 'Health checks'
2021-06-29 09:58:41.506 +04:00 [INF] Executed endpoint 'Health checks'
2021-06-29 09:58:41.507 +04:00 [INF] Request finished HTTP/1.1 GET https://localhost:44354/health-status - - - 200 - application/json 221.2138ms


Also there looks to be dependency injection error. So I'll give some context to the issue in the next thread.

You can check microsoft documentation about Developing ASP.NET Core Applications with Docker over HTTPS.

Hi, I checked the documentation and I created the container using: docker build . -f .\src\ZW.OrgSvc.HttpApi.Host\Dockerfile -t orgsvc:1

Then I run the following command to run the container:

docker run --rm -it -p 44338:44338 -p 80:80 -e "ASPNETCORE_URLS='https://+;http://+'" -e "ASPNETCORE_HTTPS_PORT=44338" -e "ASPNETCORE_ENVIRONMENT=Development" -v "$env:APPDATA\microsoft\UserSecrets\:/root/.microsoft/usersecrets" -v "$env:USERPROFILE\.aspnet\https:/root/.aspnet/https/" orgsvc:1

This doesn't create the container. For reference please take a look at my dockerfile:

#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 44338

FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS build
WORKDIR /src
COPY ["NuGet.Config", ""]
COPY ["src/ZW.OrgSvc.HttpApi.Host/ZW.OrgSvc.HttpApi.Host.csproj", "src/ZW.OrgSvc.HttpApi.Host/"]
COPY ["src/ZW.OrgSvc.HttpApi.Client/ZW.OrgSvc.HttpApi.Client.csproj", "src/ZW.OrgSvc.HttpApi.Client/"]
COPY ["src/ZW.OrgSvc.HttpApi/ZW.OrgSvc.HttpApi.csproj", "src/ZW.OrgSvc.HttpApi/"]
COPY ["src/ZW.OrgSvc.Application/ZW.OrgSvc.Application.csproj", "src/ZW.OrgSvc.Application/"]
COPY ["src/ZW.OrgSvc.Application.Contracts/ZW.OrgSvc.Application.Contracts.csproj", "src/ZW.OrgSvc.Application.Contracts/"]
COPY ["src/ZW.OrgSvc.Domain.Shared/ZW.OrgSvc.Domain.Shared.csproj", "src/ZW.OrgSvc.Domain.Shared/"]
COPY ["src/ZW.OrgSvc.MongoDB/ZW.OrgSvc.MongoDB.csproj", "src/ZW.OrgSvc.MongoDB/"]
COPY ["src/ZW.OrgSvc.Domain/ZW.OrgSvc.Domain.csproj", "src/ZW.OrgSvc.Domain/"]
RUN dotnet tool install --global Volo.Abp.Cli
ENV PATH /root/.dotnet/tools:$PATH
RUN echo $PATH
RUN abp login myUserName -p <my password>
RUN dotnet restore "src/ZW.OrgSvc.HttpApi.Host/ZW.OrgSvc.HttpApi.Host.csproj"
COPY . .
WORKDIR "/src/src/ZW.OrgSvc.HttpApi.Host"
RUN dotnet build "ZW.OrgSvc.HttpApi.Host.csproj" -c Release -o /app/build
RUN abp logout

FROM build AS publish
RUN dotnet publish "ZW.OrgSvc.HttpApi.Host.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ZW.OrgSvc.HttpApi.Host.dll"]

Please let me know if the dockerfile meets the requirements for abp application. Should I login to download the nuget packages or if I have to put it to release, then can I skip signing in?

Thank you

Showing 91 to 100 of 128 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30