Dotnetnuke (DNN96) 500 server error

Hello,

I’m getting a 500 server error when trying to run dotnetnuke that’s attached to an Azure DB. Here is my log file:

FROM mcr.microsoft.com/windows/servercore/iis

#purges default web files
RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\*

#setup Remote IIS management
RUN powershell -NoProfile -Command Install-WindowsFeature Web-Mgmt-Service; \
New-ItemProperty -Path HKLM:\software\microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1 -Force; \
Set-Service -Name wmsvc -StartupType automatic;

#add user for remote IIS manager login
RUN powershell -NoProfile -Command net user iisadmin P4ssw0rd!! /ADD; \
net localgroup administrators iisadmin /add;

#set permissions for wwwroot and install URL Rewrite 2 Module in IIS
RUN powershell -NoProfile -Command Invoke-WebRequest -Uri https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi -OutFile c:\inetpub\rewrite-install.msi; \
    cmd /c msiexec.exe /i c:\inetpub\rewrite-install.msi /L*v c:\inetpub\logs\rewrite-install-log.log; \
    cmd /c icacls c:\inetpub\wwwroot /t /grant "IIS AppPool\DefaultAppPool":(OI)(CI)(M) ; \
    cmd /c icacls c:\inetpub\wwwroot /t /grant "NT AUTHORITY\NetworkService":(OI)(CI)(F) ;
   
#install nuget and git in image
    #RUN powershell -NoProfile -Command Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile "C:\windows\nuget.exe" -UseBasicParsing
    #RUN powershell -NoProfile -Command c:\windows\nuget.exe install gitforwindows

WORKDIR /inetpub/wwwroot

COPY content/MyFirstProject/ .

Log Files:

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-07-12 19:12:50
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status
sc-substatus sc-win32-status time-taken
2020-07-12 19:12:50 172.24.164.255 GET / - 80 - 172.24.160.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.3
6+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 - 500 19 33 133
2020-07-12 19:12:50 172.24.164.255 GET /favicon.ico - 80 - 172.24.160.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleW
ebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 http://172.24.164.255/ 500 19 33 43
2020-07-12 19:21:15 172.24.164.255 GET / - 80 - 172.24.160.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.3
6+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 - 500 19 33 42
2020-07-12 19:21:15 172.24.164.255 GET /favicon.ico - 80 - 172.24.160.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleW
ebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 http://172.24.164.255/ 500 19 33 42
2020-07-12 19:21:17 172.24.164.255 GET / - 80 - 172.24.160.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.3
6+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 - 500 19 33 42
2020-07-12 19:21:17 172.24.164.255 GET /favicon.ico - 80 - 172.24.160.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleW
ebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 http://172.24.164.255/ 500 19 33 41

I’ve made sure the permissions are set correctly, I’ve installed the IIS Rewrite 2 module, and nonetheless I get the 500 server error.

Running index.html with Hello World in it works perfectly. The default IIS files load perfectly as well. This only happens when I put the DNN content in the wwwroot folder inside the container. Please help if anyone knows how to resolve this issue.

Best,
Ben