Comments (13)
This error looks a little vague. It's hard to tell what the issue is. Do you know which IIS feature is required by your website? You might need to install them in your container.
We have something like this in our docker file for ASP.NET tests. Note that this is for .NET 45 but it might include some feature that you are missing. You can go over these features and see if any of these is what you need
RUN start /w dism /online /enable-feature /featurename:IIS-WebServerRole /featurename:WAS-WindowsActivationService /featurename:WAS-ProcessModel /featurename:NetFx4Extended-ASPNET45 /featurename:WAS-NetFxEnvironment /featurename:WAS-ConfigurationAPI /featurename:IIS-ApplicationDevelopment /featurename:IIS-NetFxExtensibility /featurename:NetFx3 /featurename:IIS-ASPNET /featurename:IIS-ASPNET45 /featurename:IIS-NetFxExtensibility /featurename:IIS-NetFxExtensibility45 /featurename:IIS-DefaultDocument /featurename:IIS-NetFxExtensibility /featurename:IIS-ISAPIExtensions /featurename:IIS-ISAPIFilter /featurename:IIS-RequestFiltering /featurename:IIS-Metabase /featurename:IIS-WMICompatibility /featurename:IIS-LegacyScripts /featurename:IIS-IIS6ManagementCompatibility /featurename:IIS-WebServerManagementTools /featurename:IIS-HttpTracing
from aspnet-docker.
Can you try adding this Dockerfile to containerImageNet35
FROM microsoft/aspnet:3.5
ARG site_root=.
ADD ${site_root} /inetpub/wwwroot
build
docker build -t mysite1 .
and then launch
docker run -d -p=80:80 mysite1
hit the default website
from aspnet-docker.
@shhsu
thank for your help.
default website run well.
my i change ${site_root} to my application folder,
like
FROM microsoft/aspnet:3.5
Next, this Dockerfile creates a directory for your application
RUN mkdir C:\aspnet35
ARG site_root=.
ADD ${site_root} C:\aspnet35
ADD net35/ /aspnet35
ps. net35 folder is my asp.net webforms application
thank.
from aspnet-docker.
@shhsu
i modify your docker file like below,
FROM microsoft/aspnet:3.5
ARG site_root=.
ADD ${site_root} /inetpub/wwwroot
ADD net35/ /inetpub/wwwroot
after run ,
i will get 500 error
There is a problem with the resource you are looking for, and it cannot be displayed.
may i get the app detail error messages?
thanks.
from aspnet-docker.
@shhsu
if i put my web.config will cause 500 error.
my web.config is vs.net 's default config.
if i don't copy web.config then it work well.
from aspnet-docker.
@shhsu
if my web.config contains
section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"
will cause 500 error.
should we remove configSections session from web.config ?
do you have any ideas ?
Thanks for your help.
from aspnet-docker.
is your ${site_root} relative path?
absolute path would not work in docker file. I would that the files you add to the docker context be in the same folder or sibling to the docker file because the docker would include the entire directory you referred to the build context.
from aspnet-docker.
@shhsu
yes.
it will get 500 error, if web.config include configSections session.
should we remove configSections session from web.config ?
my config like web.config.txt.
Web.config.txt
thank for your help.
from aspnet-docker.
Not sure what the problem could be.
To find the reason of 500 error, there are a few places you can look
- Your applications log file directory
- %SystemDrive%\Windows\System32\LogFiles\HTTPERR
- %SystemDrive%\Windows\System32\winevt\logs
from aspnet-docker.
@shhsu
Thank for your help.
I have a question.
How can i copy container's files to host machine after docker run?
Thanks.
if web.config include configSections session below (default web.config), will cause server error.
<configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> </sectionGroup> </sectionGroup> </sectionGroup> </configSections>
from aspnet-docker.
@rainmakerho docker cp
should do the trick.
from aspnet-docker.
@janvorli
Thank for your help.
I use docker cp , after docker run.
i have problem below,
docker cp f4:C:\inetpub\wwwroot .\mysite1
Error response from daemon: hcsshim::ActivateLayer failed in Win32: The process cannot access the file because it is being used by another process.
(0x20) id=f47aa0b21b9b9a43e3e01c9f82e3ea22c7f7a33998ac9f58544a2671684a2b24 flavour=1
from aspnet-docker.
@shhsu
ok. Thanks for you help.
from aspnet-docker.
Related Issues (20)
- Add support for Windows Server 2019 HOT 15
- manifest for microsoft/aspnet:4.7.2-windowsservercore-ltsc2019 not found HOT 2
- small typo in 4.7.2-windowsservercore-ltsc2019 directory
- microsoft/aspnet:4.7.2-windowsservercore-1803 is not supported in web app windows container HOT 1
- [Powershell] A positional parameter cannot be found that accepts argument HOT 1
- 'Host.docker.internal' does not resolve from inside container HOT 1
- aspnetcore-runtime doesn't have an assembly to compile razor views HOT 1
- aspnet:4.7.2-windowsservercore-ltsc2019 printers not available HOT 2
- microsoft/dotnet:2.2-runtime doesn't support [email protected] HOT 1
- ERROR: Failed to start or query status of service 'w3svc' error, while setting IIS Web Application authentication HOT 1
- No matching manifest for unknown in the manifest list entries HOT 2
- .NET Core docker image doesn't support JavaScriptServices HOT 2
- dotnet framework linux support HOT 1
- Using images in Azure d
- Using images in Azure DevOps pipeline not working HOT 2
- microsoft/iis:windowsservercore-1709 is not supported in web app windows container HOT 7
- You guys broke Swashbuckle/Swagger in the latest version of microsoft/aspnet:4.6.2-windowsservercore-ltsc2016 HOT 3
- Tag list has not been updated since January 2019 HOT 2
- Failed to run as a self-contained app. If this should be a framework-dependent app, add the /app/Servicesruntimeconfig.json file specifying the appropriate framework. HOT 1
- Question: Is There a Way to Get Notify/Email/Webhook If Offical Image is Updated? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet-docker.