Install-ACMECertificate Fails when bindings like net.pipe or net.tcp exist (without port information)
daitj opened this issue · comments
Binay Devkota commented
#321 Is the fix for this.
Using IIS Provider
Command used:
Install-ACMECertificate -CertificateRef cert-domains -Installer iis -InstallerParameters @{
WebSiteRef = $IISWebsiteName
BindingAddress = '0.0.0.0'
BindingHost = ''
BindingPort = 443
Force = $true
} -VaultProfile $CustomVaultName
Exception
Install-ACMECertificate : Value cannot be null.
PS C:\Windows\system32> $Error[1].Exception.StackTrace
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boole
n parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at ACMESharp.Providers.IIS.IisHelper.<>c__DisplayClass11_0.<ResolveSiteBindings>b__0(IisWebSiteBinding _) in C:\proj
cts\acmesharp\ACMESharp\ACMESharp.Providers.IIS\IisHelper.cs:line 231
at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at ACMESharp.Providers.IIS.IisInstaller.Install(PrivateKey pk, Crt crt, IEnumerable`1 chain, IPkiTool cp) in C:\proj
cts\acmesharp\ACMESharp\ACMESharp.Providers.IIS\IisInstaller.cs:line 61
at ACMESharp.POSH.InstallCertificate.ProcessRecord() in C:\projects\acmesharp\ACMESharp\ACMESharp.POSH\InstallCertif
cate.cs:line 228
at System.Management.Automation.CommandProcessor.ProcessRecord()
Stack trace says this line is the culprit: