I have an experimental project and I want to run asp.net Soap service inside docker container. I already created windows container and copied all necessary files in it. My service using web.config connection string encryption. When I try to run service I get below error
docker run -d -p 8000:80 --name my-service my-service
Parser Error Message: Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B)
I tried on to install aspnet_regiis.exe -i command inside container and I got below error
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0 Administration utility to install and uninstall ASP.NET on the local machine. Copyright (C) Microsoft Corporation. All rights reserved. Start installing ASP.NET (4.0.30319.0). This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool. For more details please see http://go.microsoft.com/fwlink/?LinkID=216771. Finished installing ASP.NET (4.0.30319.0).
I am adding Dockerfile
FROM microsoft/iis
RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\*
RUN mkdir C:\\MyService
COPY . c:\\MyService
RUN powershell -NoProfile -Command \
Import-module IISAdministration;
RUN dism /online /enable-feature /featurename:IIS-WebServerRole \
/featurename:IIS-WebServer \
/featurename:IIS-CommonHttpFeatures \
/featurename:IIS-StaticContent \
/featurename:IIS-DefaultDocument \
/featurename:IIS-DirectoryBrowsing \
/featurename:IIS-HttpErrors \
/featurename:IIS-ApplicationDevelopment \
/featurename:IIS-CGI \
/featurename:IIS-HealthAndDiagnostics \
/featurename:IIS-HttpLogging \
/featurename:IIS-Security \
/featurename:IIS-RequestFiltering \
/featurename:IIS-Performance \
/featurename:IIS-HttpCompressionStatic \
/featurename:IIS-WebServerManagementTools
ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]
RUN powershell -Command Add-WindowsFeature NET-Framework-45-ASPNET
RUN powershell -Command Add-WindowsFeature Web-Asp-Net45
RUN powershell -Command Remove-Website -Name 'Default Web Site'
RUN powershell -Command New-Website -Name 'MyService' -Port 80 -PhysicalPath 'c:\MyService\' -ApplicationPool '.NET v4.5'
EXPOSE 80
User contributions licensed under CC BY-SA 3.0