Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

432
Vistas
Docker for windows - Internal server error

I am having a problem when running one of my solutions in Docker Desktop for Windows. I use the following dockerfile:

# escape=`
FROM microsoft/iis
SHELL ["powershell", "-command"]
# Install ASP.NET
RUN Install-WindowsFeature NET-Framework-45-ASPNET; `  
    Install-WindowsFeature Web-Asp-Net45
# Configure website
EXPOSE 8000  
RUN Remove-Website -Name 'Default Web Site'; `  
md c:\barometer; `
New-Website -Name 'barometer' `
            -Port 8000 -PhysicalPath 'c:\barometer' `
            -ApplicationPool '.NET v4.5'
COPY PublishOutput c:\barometer

My build steps are as follows:

docker build -t mvcbarometer .
docker run -d --name barometer mvcbarometer
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" barometer

Everything builds fine, but i get the following error when visiting the site: "There is a problem with the resource you are looking for, and it cannot be displayed."

- http://imgur.com/a/areF8

For some reason i cannot get the classic yellow error page that is shown when debugging through visual studio, even though i am using the same configuration.

It does not seem like docker logs any errors anywhere, so i am kinda stuck at debugging the problem. My other (more basic) projects works fine with a similar docker build setup.

I read somewhere that docker has problems with certain web.config elements, but i cannot find any real documentation on the subject.

Could anyone help me with debugging the problem?

about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I finally found the problem. I was using url rewrite 2.0 functionality, but forgot to install it in the docker image.

Adding the following to my docker file solved the problem:

# Install Url Rewrite
ADD https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi /install/rewrite_amd64.msi
RUN msiexec.exe /i c:\install\rewrite_amd64.msi /passive
about 4 years ago · Santiago Trujillo Denunciar

0

It seems iis lacks access permissions to the directory. Try to copy wwwroot directory permissions and assign it to the new site.

RUN Set-Acl -Path c:\barometer -AclObject (Get-Acl -Path "C:\inetpub\wwwroot");
about 4 years ago · Santiago Trujillo Denunciar

0

Could anyone help me with debugging the problem?

I had the same trouble debugging an ASP.NET app in Docker. I found the answer here.

<configuration>
  <system.webServer>
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda