Hi,
I was trying to containerize the .NET 4.7.2 framework application, The container was up and running and when I was try to access I was getting 500.19 error in the web browser. When I try to see the container logs, I could see I was empty. I was completely not sure why whether the base images I was trying have some issue or the container permission to fetch the file or any IIS issue on the container, I’ll attach the errors, Dockerfile and docker-compose file as well. Please help me on the same to fix these things.
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019 - my current image in which container is up and running
RUN powershell -NoProfile -Command
Install-WindowsFeature -Name Web-Server;
Install-WindowsFeature -Name Web-Mgmt-Console;
Install-WindowsFeature -Name Web-Mgmt-Service
WORKDIR /inetpub/wwwroot
COPY . .
RUN powershell -NoProfile -Command
Import-Module WebAdministration;
# Create application pool
New-WebAppPool -Name “scriberyte_webapp_pool”;
# Create a new website and assign it to the app pool
New-Website -Name “scriberyte_webapp” -Port 2312 -PhysicalPath “C:\inetpub\wwwroot” -ApplicationPool “scriberyte_webapp_pool”
CMD [“C:\ServiceMonitor.exe”, “w3svc”]