All folowing on Server2016 image on Azure
Container built on microsoft/aspnet/ image
application built on .net 4.0 copied to container
IIS applications built using powershell
go from host to container ip -> display Default.htm
go from host to container ip/AppName -> App start
Actual behavior
go from host to container ip -> display Default.htm OK
go from host to container ip/AppName -> "Server Error in ‘/’ Application"
go from host to container ip/AppName/default.aspx -> "Server Error in ‘/’ Application"
go from host to ip/AppName/Client/Default.htm (or any other location) same file as root -> 404
Information
I’ve googled everywhere man …
and have 3 avenues to explore
It’s a windows permission issue for folders
I’ve got wrong .Net version in AppPool
I’m using wrong image, start with microsoft/iis instead
Which is the likely to be the most productive avenue to investigate, or would others be better?
I’m seeing the same behavior running Docker on Win10. 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! Weird…
Here is the full Dockerfile contents:
FROM microsoft/aspnet:4.6.2
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\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