Closed hhoutaptean closed 1 year ago
The place where you got the error:
ForEach-Object : Exception setting "ServerCertificateCustomValidationCallback": "Cannot convert the "static bool
DisabledServerCertificateValidationCallback(System.Object sender, X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)" value of type "System.Management.Automation.PSMethod" to type "System.Func`5[System.Net.Http.HttpRequestMessage,Sys
tem.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean]".
"
At C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\5.0.4\AppHandling\Publish-NavContainerApp.ps1:157 char:43
'+ $appFiles | Where-Object { $_ } | ForEach-Object {
'+ ~~~~~~~~~~~~~~~~
' + CategoryInfo : NotSpecified: (:) [ForEach-Object], SetValueInvocationException
' + FullyQualifiedErrorId : ExceptionWhenSetting,Microsoft.PowerShell.Commands.ForEachObjectCommand
could you share some more output before the error? Are you running PowerShell 7 or PS 5? Does it say: Downloading using WebClient or Downloading using HttpClient?
No need to reply - I can see the reason why this is failing...
Shipped
Issue When deploying environments (using https://bcinsider.azureedge.net/sandbox/22.4.58605.0/base) on basis of the navarmtemplate and publishing extensions we got the below error when using BcContainerHelper v5.0.4 when using the Publish-NavContainerApp command with -useDevEndpoint, to work around we switched back to BcContainerHelper v5.0.3:
ForEach-Object : Exception setting "ServerCertificateCustomValidationCallback": "Cannot convert the "static bool DisabledServerCertificateValidationCallback(System.Object sender, X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)" value of type "System.Management.Automation.PSMethod" to type "System.Func`5[System.Net.Http.HttpRequestMessage,Sys tem.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean]". " At C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\5.0.4\AppHandling\Publish-NavContainerApp.ps1:157 char:43 '+ $appFiles | Where-Object { $_ } | ForEach-Object { '+
~~~~ ' + CategoryInfo : NotSpecified: (:) [ForEach-Object], SetValueInvocationException ' + FullyQualifiedErrorId : ExceptionWhenSetting,Microsoft.PowerShell.Commands.ForEachObjectCommandScripts used to create container
Full output of scripts