microsoft / aspnet-docker

This repository has moved to microsoft/dotnet-framework-docker.
https://github.com/Microsoft/dotnet-framework-docker
MIT License
135 stars 73 forks source link

Default AppPool in 3.5 image is incorrect #4

Closed shirhatti closed 7 years ago

shirhatti commented 8 years ago

The default AppPool should be changed to a v2.0 AppPool

shirhatti commented 7 years ago
New-IISSite -Name test4 -PhysicalPath C:\inetpub\wwwroot\test3 -BindingInformation "*:1234:"
Start-IISCommitDelay
$a = get-iissite -Name test4
$a.Applications["/"].ApplicationPoolName = ".NET v2.0"
Stop-IISCommitDelay 
rainmakerho commented 7 years ago

hi shirhatti, my dockerfile is below,

extending the microsoft/iis image.

FROM microsoft/iis

MAINTAINER RM from rainmaker_ho@gss.com.tw

Setup

將 dotnetframework 目錄中的檔案 Copy 到 container 的 build 目錄之中

ADD dotnetframework /build RUN DISM /Online /Add-Package /PackagePath:C:\build\microsoft-windows-netfx3-ondemand-package.cab & del C:\build\microsoft-windows-netfx3-ondemand-package.cab RUN powershell -Command Add-WindowsFeature Web-Asp-Net

RUN mkdir C:\randomanswers

configure the new site in IIS.

RUN powershell -NoProfile -Command \ Import-module IISAdministration; \ New-IISSite -Name test4 -PhysicalPath C:\randomanswers -BindingInformation "*:8000:"

RUN powershell Start-IISCommitDelay RUN powershell $a = get-iissite -Name test4 RUN powershell $a.Applications.Count RUN powershell $a.Applications[\"/\"].ApplicationPoolName = ".NET v2.0" RUN powershell Stop-IISCommitDelay

when build it, $a.Applications.Count 's value is 0. so ... $a.Applications[\"/\"].ApplicationPoolName = ".NET v2.0" will cause error.

shirhatti commented 7 years ago

@shhsu Could you take a look?

shhsu commented 7 years ago

@rainmakerho

This docker file has several problems and will definitely not work.

Also, please open a new issue for this if you have further questions. Feel free to assign it to me. This issue is not for tracking general questions

shirhatti commented 7 years ago

Fixed by #20