admin管理员组文章数量:1336174
i want to use StoreBroker in a TFS Build-Pipeline fow publishing a app into the windows store. for this i use following script:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$clientId="<clientid>"
$clientSecret="<clientsecret>"
$tenantId="<tenant>"
Import-Module StoreBroker
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
$css = ConvertTo-SecureString -String $ClientSecret -AsPlainText -force -Debug
$cred = New-Object System.Management.Automation.PSCredential $ClientId, $css
Set-StoreBrokerAuthentication -TenantId $TenantId -Credential $cred -Debug
Get-Applications -GetAll | Format-Applications -Verbose
- When using this Script on Windows 11 client machine, everything works fine.
- When using this Script on Windows Server 2016, i get the following message:
Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:556 char:9
+ Write-Log -Message $newLineOutput -Level Error
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Log
Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:557 char:9
+ throw $newLineOutput
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Be sure to chec...rred on a send.:String) [], RuntimeException
+ FullyQualifiedErrorId : Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
Do you have an idea?
best regards
Volkhard
i want to use StoreBroker in a TFS Build-Pipeline fow publishing a app into the windows store. for this i use following script:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$clientId="<clientid>"
$clientSecret="<clientsecret>"
$tenantId="<tenant>"
Import-Module StoreBroker
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
$css = ConvertTo-SecureString -String $ClientSecret -AsPlainText -force -Debug
$cred = New-Object System.Management.Automation.PSCredential $ClientId, $css
Set-StoreBrokerAuthentication -TenantId $TenantId -Credential $cred -Debug
Get-Applications -GetAll | Format-Applications -Verbose
- When using this Script on Windows 11 client machine, everything works fine.
- When using this Script on Windows Server 2016, i get the following message:
Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:556 char:9
+ Write-Log -Message $newLineOutput -Level Error
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Log
Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:557 char:9
+ throw $newLineOutput
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Be sure to chec...rred on a send.:String) [], RuntimeException
+ FullyQualifiedErrorId : Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
Do you have an idea?
best regards
Volkhard
Share Improve this question asked Nov 19, 2024 at 22:17 Volkhard VogelerVolkhard Vogeler 274 bronze badges1 Answer
Reset to default 0I can reproduce the same issue when I tried the script on the Windows Server 2016.
Then I found the error The underlying connection was closed: An unexpected error occurred on a send.
is similar with the one in this question and it is found that the older versions of DOTNET framework (i.e. 3.5 and 4.0) do not inherently support the newer versions of TLS like 1.2 and 1.3.
To solve the issue, there is an easy way to check and update the TLS 1.2 compatibility of the .NET Framework.
Here are the steps:
- Visit the https://github/microsoft/azure-devops-tls12 and download the Azure DevOps TLS 1.2 transition readiness checker.
- Run the script:
AzureDevOpsTls12Analysis.ps1
It will check the TLS settings on your windows server 2016 and you may find the following result: - Run the generated mitigation script generated:
Mitigation-NetFramework.ps1
- Rerun your PowerShell script again. This time, the error
The underlying connection was closed: An unexpected error occurred on a send.
should not be there anymore.
本文标签: azure devopsStoreBroker on Windows 2016 doesn180t authenticateStack Overflow
版权声明:本文标题:azure devops - StoreBroker on Windows 2016 doesn´t authenticate - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742395194a2466780.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论