aspnet / aspnet-docker

[Archived] ASP.NET Core Docker images for 1.x. Go to https://github.com/dotnet/dotnet-docker for 2.1 and up.
https://asp.net
719 stars 171 forks source link

Failed to start monitoring changes to 'C:\inetpub\wwwroot\App_Code'. in Docker container #359

Closed sudha559 closed 6 years ago

sudha559 commented 6 years ago

Hi All, I am trying to containerise the asp.net traditional web application.I am able to launch the container.While I am trying to launch the website in browser i am getting below error: Please see below Image. error

Dockerfile: FROM microsoft/aspnet:4.7.1-windowsservercore-ltsc2016

ARG source WORKDIR /inetpub/wwwroot COPY ${source:-obj/Docker/publish} .

RUN mkdir App_Cert

RUN cd App_Cert

COPY c:\users\smaram002\downloads\App_Cert\ .

ENTRYPOINT ["powershell", "-command Import-Certificate -CertStoreLocation cert:\localmachine\root -Filepath C:\inetpub\wwwroot\Cert\OFISSigningCert.cer"]

And I have tried below solution:

Adding a user so i can connect trough IIS Manager: RUN NET USER testing "Password01!" /ADD RUN NET LOCALGROUP "Administrators" "testing" /add Grant Permissions: RUN icacls "C:\IIS*" /grant everyone:(OI)(CI)F /T

Install neccassary features

RUN powershell Install-WindowsFeature Web-Mgmt-Service RUN powershell Install-WindowsFeature Web-Windows-Auth RUN powershell Install-WindowsFeature NET-Framework-45-ASPNET RUN powershell Install-WindowsFeature Web-Asp-Net45 RUN powershell Install-WindowsFeature NET-WCF-HTTP-Activation45 Start Service and make it autorun RUN net start wmsvc RUN sc config WMSVC start= auto RUN powershell -NoProfile -Command Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1

Docker logs: PS C:\Users\smaram002> docker logs c4a9dd870437 ERROR ( message:Cannot find requested collection element. ) Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" ERROR ( message:Cannot find requested collection element. ) Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" PS C:\Users\smaram002>

Please share your views .....Thanks

natemcmaster commented 6 years ago

Please open an issue on https://github.com/Microsoft/aspnet-docker. This repository is for microsoft/aspnetcore and microsoft/aspnetcore-build.