Thursday, 1 December 2016

Error when installing Docker on Windows Server 2016

When following the install guide here, ensure that you are running PowerShell as x64 (not x86!) otherwise you'll get the following error when trying to run the command:

PS C:\Windows\system32> Install-Package -Name docker -ProviderName DockerMsftProvider

The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'DockerDefault'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
Install-Package : The term 'Get-WindowsFeature' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
At line:1 char:1
+ Install-Package -Name docker -ProviderName DockerMsftProvider
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
    + FullyQualifiedErrorId : FailedToDownload,Install-Package,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallP

Friday, 17 June 2016

Owin Startup Not Executed

I've been bashing my head over this problem today. My Owin Startup class wasn't being executed. I'd followed the usual instructions of ensuring the "Microsoft.Owin.Host.SystemWeb" package was installed. I had the correct attribute on the assembly ([assembly: OwinStartup(typeof(StartupDemo.TestStartup))]), clearing the ASP.NET cache, etc etc.

Eventually I found that if you have set a friendly name for your startup class (in the instance where you may have multiple Startup.cs files) - then you need to also make sure you add the friendly name to your appSettings in the web.config too!

<add key="owin:appStartup" value="StartupDemo.ProductionStartup"/>