I have a .net 6.0 web App which is containerized by windows based docker image, and it worked good. But when I migrate my APP to .net 8.0, and modified corresponding settings in Dockerfile, my App always throw error HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) But all codes work good when I deploy them on-primese using IIS in Windows Server 2016.
My Dockerfile is as bellow:
FROM mcr.microsoft.com/windows/servercore/iis AS final
SHELL ["powershell"]
EXPOSE 80 443
RUN Invoke-WebRequest 'https://download.visualstudio.microsoft.com/download/pr/7f4d5cbc-4449-4ea5-9578-c467821f251f/b9b19f89d0642bf78f4b612c6a741637/dotnet-runtime-8.0.0-win-x64.exe' -UserAgent '' -OutFile "C:/dotnet-runtime.exe"
RUN Start-Process -FilePath "c:/dotnet-runtime.exe" -ArgumentList @('/install', '/q', '/norestart', 'OPT_NO_RUNTIME=1', 'OPT_NO_SHAREDFX=1') -Wait -PassThru
RUN Invoke-WebRequest 'https://download.visualstudio.microsoft.com/download/pr/2a7ae819-fbc4-4611-a1ba-f3b072d4ea25/32f3b931550f7b315d9827d564202eeb/dotnet-hosting-8.0.0-win.exe' -UserAgent '' -OutFile "C:/dotnet-hosting.exe"
RUN Start-Process -FilePath "c:/dotnet-hosting.exe" -ArgumentList @('/install', '/q', '/norestart', 'OPT_NO_RUNTIME=1', 'OPT_NO_SHAREDFX=1') -Wait -PassThru
# Copy the build artifacts
ADD MyApp /inetpub/wwwroot
What's wrong with my installing on hosting bundle of .net 8? But it work good for .net 6, is there any break changes for .net 8 on hosting bundle?(I find nothing by now)