microsoft / iis-docker

Dockerfile for IIS
https://hub.docker.com/r/microsoft/iis/
MIT License
293 stars 129 forks source link

ERROR: Failed to start or query status of service 'w3svc' error, while setting IIS Web Application authentication #146

Closed StephenMolloy closed 7 months ago

StephenMolloy commented 5 years ago

From @suseendare on Thursday, 31 January 2019 09:56:48

Trying to update authentication of Web Application in IIS, using Powershell via dockerfile. Tried directly using RUN instruction as well as using a ps1 file.

Set-WebConfigurationProperty -Filter "/system.webServer/security/authentication/anonymousAuthentication" -Name Enabled -Value False -PSPath IIS:\ -Location "'Default Web Site/MyWebApp'"; Set-WebConfigurationProperty -Filter "/system.webServer/security/authentication/basicAuthentication" -Name Enabled -Value False -PSPath IIS:\ -Location "'Default Web Site/MyWebApp'"; Set-WebConfigurationProperty -Filter "/system.webServer/security/authentication/windowsAuthentication" -Name Enabled -Value True -PSPath IIS:\ -Location "'Default Web Site/MyWebApp'";

W3SVC stops. If the same commands are run in interactive terminal mode, the commands work fine and W3SVC does not stop. It fails only while using dockerfile.

This is happening in below images:

dockerfile available in below link: https://stackoverflow.com/questions/54333074/aspnet-docker-image-updating-authentication-using-powershell-stops-w3svc

Copied from original issue: Microsoft/aspnet-docker#160

Vaccano commented 5 years ago

This is happening with a ltsc2019 based container for me.

DanOrsborne commented 5 years ago

This is happening with a ltsc2019 based container for me too Some work and some randomly crash - any fix?