I am trying to containerize in Windows Container a .net framework 4.5.1 MVC application. I created a template application as VS creates it , without change anything. I publish the app and tried on my windows locall iis server and runs ok. Then i tried to put in container with the following Dockerfile:
# Build stage
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 as build
COPY . /app
WORKDIR /app
RUN msbuild netapp451.sln /p:Configuration=Release /p:OutDir=C:\app\bin
RUN dir
WORKDIR /app/bin/
# Runtime stage
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 as final
COPY --from=build /app/bin/ /inetpub/wwwroot
EXPOSE 80
The image successfully builted. I run it with docker run -d -p 8082:80 test4511.
in my browser i enter HTTP://localhost:8082 and i get
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.