Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error during installation 2.1.0 #137

Closed
artisticcheese opened this issue Sep 6, 2017 · 7 comments
Closed

Getting error during installation 2.1.0 #137

artisticcheese opened this issue Sep 6, 2017 · 7 comments

Comments

@artisticcheese
Copy link

artisticcheese commented Sep 6, 2017

Trying to install inside NanoServer and getting error below. This is being installed inside ASP.NET core docker image (microsoft/aspnetcore:2.0.0-nanoserver). Probably need to switch to use NotAfter property of X509Certificate2 type

PS C:\temp\setup> .\setup.ps1 install -verbose
VERBOSE: Verifying user is an Administrator
VERBOSE: Ok
VERBOSE: Verifying user is an Administrator
VERBOSE: Ok
Checking installation requirements
VERBOSE: Ok
VERBOSE: Verifying .NET Core shared framework installed
VERBOSE: Ok
VERBOSE: Checking if port '55539' is available
VERBOSE: Ok
Installation Requirements met
VERBOSE: Creating installaton directory C:\Program Files\IIS Administration\2.1.0
Copying files
VERBOSE: Creating new IIS Administration Certificate
Rolling back
Rolling back logs folder creation
Rolling back installation folder creation
Finished rolling back.
C:\temp\setup\setup.ps1 : Method invocation failed because [System.Security.Cryptography.X509Certificates.X509Certificate2] does not contain a method named 'GetEffectiveDateString'.
At C:\temp\setup\cert.ps1:247 char:35
+ ... rtificate | %{[System.DateTime]::Parse($_.GetEffectiveDateString())}  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At line:1 char:1
+ .\setup.ps1 install -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], RuntimeException
    + FullyQualifiedErrorId : System.Management.Automation.RuntimeException,setup.ps1

Dockerfile

FROM microsoft/aspnetcore:2.0.0-nanoserver
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"]
ADD https://az880830.vo.msecnd.net/nanoserver-ga-2016/Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab /install/Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab
ADD https://az880830.vo.msecnd.net/nanoserver-ga-2016/Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab /install/Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab
RUN start-process -Filepath dism.exe -ArgumentList  @('/online', '/add-package', '/packagepath:c:\install\Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab') -Wait 
RUN start-process -Filepath dism.exe -ArgumentList  @('/online', '/add-package', '/packagepath:c:\install\Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab') -Wait 
RUN start-process -Filepath dism.exe -ArgumentList  @('/online', '/add-package', '/packagepath:c:\install\Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab') -Wait 
RUN remove-item "c:\\install\\*" -force
EXPOSE 80
@jimmyca15
Copy link
Member

I confirmed this issue. Thanks for posting the DOCKERFILE. I know the fix and what I can do is patch the setup files in the IIS.Administration.zip and then replace it.

Another thing to take note of is that the docker image you specified does not have .NET Core 1.0.* which is required to run IIS Administration.

@jimmyca15
Copy link
Member

https://github.com/Microsoft/IIS.Administration/blob/b21c9379593cbd805cea4ce8984a49e449c5500a/scripts/setup/cert.ps1#L247

[System.DateTime]::Parse($.GetEffectiveDateString()) should be replaced with $.NotBefore

https://github.com/Microsoft/IIS.Administration/blob/b21c9379593cbd805cea4ce8984a49e449c5500a/scripts/setup/cert.ps1#L300

[System.DateTime]::Parse($.GetExpirationDateString()) should be replaced with $.NotAfter

@artisticcheese
Copy link
Author

Is it hard dependency to have .NET core 1.0 even if .NET core 2.0 is already available? Since it's Nanoserver it's super difficult to install anything on it and I hoped since image already have 2.0 it can be used instead.

@jimmyca15
Copy link
Member

Yes it is a strict dependency on the .NET Core 1.0 runtime.

@drago-draganov
Copy link
Contributor

To elaborate a little bit:
.NET Core 1.0 is currently the only release with long term support (details).
IIS Administration will move to .NET Core 2.0 when long term support is established.

@jimmyca15
Copy link
Member

An update to this issue.

The issues in the PowerShell installation script for version 2.1.0 obtained from https://github.com/Microsoft/IIS.Administration/releases/download/v2.1.0/IIS.Administration.zip that throw an error on Nano Server are still present. There are some blocking issues preventing us from replacing the affected ps1 files as I mentioned I would like to do previously.

The issue has been fixed in #141 and we plan to release 2.2.0 soon which has been tested on Nano Server.

Regarding the requirement for .NET Core 1.0.*. There is a container image that comes with .NET Core 1.0.* at microsoft/aspnetcore:1.0.7-nanoserver. I have used this image for running the API.

I used the DOCKERFILE mentioned previously and just changed 2.0.0 to 1.0.7

FROM microsoft/aspnetcore:1.0.7-nanoserver
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"]
ADD https://az880830.vo.msecnd.net/nanoserver-ga-2016/Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab /install/Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab
ADD https://az880830.vo.msecnd.net/nanoserver-ga-2016/Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab /install/Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab
RUN start-process -Filepath dism.exe -ArgumentList  @('/online', '/add-package', '/packagepath:c:\install\Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab') -Wait 
RUN start-process -Filepath dism.exe -ArgumentList  @('/online', '/add-package', '/packagepath:c:\install\Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab') -Wait 
RUN start-process -Filepath dism.exe -ArgumentList  @('/online', '/add-package', '/packagepath:c:\install\Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab') -Wait 
RUN remove-item "c:\\install\\*" -force
EXPOSE 80

@jimmyca15
Copy link
Member

jimmyca15 commented Nov 7, 2017

2.2.0 has been released which fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants