Docker Community Forums

Share and learn in the Docker community.

Consistently getting 404 from microsoft/aspnet-windowsservercore container with IIS web site


(Bktdev) #1

I’m Consistently getting 404 from microsoft/aspnet-windowsservercore container with IIS web site. I’ve tried setting permissions on the web dir for Network Service, IIS_IUSRS, and Everyone! My default page is a .aspx, and our web app is based off of DotNetNuke. Constantly get a 404 when trying to hit our default page. Although I can execute a .htm file from the same directory!

I’m running this with Dockers For Windows on a Win10 laptop.

Here is the full Dockerfile contents:

FROM microsoft/aspnet:4.6.2-windowsservercore

RUN powershell c:\windows\system32\inetsrv\appcmd.exe set config
-section:system.applicationHost/sites
/siteDefaults.logFile.directory:“c:\logfiles” /commit:apphost

RUN powershell C:\Windows\System32\inetsrv\appcmd add apppool
/apppool.name:intbase /managedRuntimeVersion:v4.0
/managedPipelineMode:Integrated
/processModel.identityType:NetworkService
/enable32bitapponwin64:true

RUN powershell New-Item -ItemType directory -Path C:\sites\intbase

RUN powershell New-Website -Name “intbase” -Port 80 -IPAddress “*” -HostHeader “intbase” -PhysicalPath “C:\sites\intbase” -ApplicationPool “intbase”

RUN powershell c:\windows\system32\dism /online /enable-feature /all /featurename:IIS-ApplicationDevelopment
RUN powershell Install-WindowsFeature -Name Web-Mgmt-Service
RUN powershell Install-WindowsFeature -Name Web-Windows-Auth
RUN powershell Install-WindowsFeature -Name NET-WCF-HTTP-Activation45
RUN powershell Install-WindowsFeature -Name NET-Framework-45-Core
RUN powershell Install-WindowsFeature -Name Web-AppInit
RUN powershell Install-WindowsFeature -Name Web-ASP
RUN powershell Install-WindowsFeature -Name Web-CGI
RUN powershell Install-WindowsFeature -Name Web-Includes
RUN powershell Install-WindowsFeature -Name Web-WebSockets
RUN powershell Install-WindowsFeature -Name Web-Request-Monitor
RUN powershell Install-WindowsFeature -Name WAS-Process-Model
RUN powershell Install-WindowsFeature -Name WAS-Config-APIs

RUN powershell New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1 -Force
RUN powershell Start-Service -Name WMSVC
RUN powershell net user bktadmin Password1! /ADD
RUN powershell net localgroup administrators bktadmin /add

COPY intbase/ \sites\intbase

EXPOSE 80