Git Product home page Git Product logo

Comments (13)

shhsu avatar shhsu commented on August 19, 2024 2

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.

shhsu avatar shhsu commented on August 19, 2024

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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

shhsu avatar shhsu commented on August 19, 2024

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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

shhsu avatar shhsu commented on August 19, 2024

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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

janvorli avatar janvorli commented on August 19, 2024

@rainmakerho docker cp should do the trick.

from aspnet-docker.

rainmakerho avatar rainmakerho commented on August 19, 2024

@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.

rainmakerho avatar rainmakerho commented on August 19, 2024

@shhsu
ok. Thanks for you help.

from aspnet-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.