- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在将 net6 ASP 项目部署到新创建的应用服务(代码/Windows)时遇到问题。我用的是
# Build the project
- task: DotNetCoreCLI@2
displayName: 'Build project'
inputs:
command: 'build'
projects: '${{ parameters.ProjectPath }}'
arguments: '--configuration ${{ parameters.BuildConfiguration }}'
# Publish the asp project build files
- task: DotNetCoreCLI@2
displayName: 'Publish project'
inputs:
command: "publish"
publishWebProjects: false # would otherwise ignore the projects parameter and would try to find all web project in the repo
projects: '${{ parameters.ProjectPath }}'
arguments: '--configuration ${{ parameters.BuildConfiguration }} /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:PackageLocation="$(Build.ArtifactStagingDirectory)"'
构建项目并
- task: AzureRmWebAppDeployment@4
displayName: 'Azure App Service Deploy: ${{ parameters.WebAppName }}'
inputs:
azureSubscription: ${{ parameters.SubscriptionConnectionName }}
WebAppName: ${{ parameters.WebAppName }}
package: '$(Pipeline.Workspace)/${{ parameters.SiteName }}-${{ parameters.ArtifactName }}/*.zip'
JSONFiles: |
**/appsettings.json
**/appsettings.Production.json
将其部署到应用服务。
部署任务正在自托管的 Azure 代理(在 Azure VM 上)上运行。
任务输出错误消息
Error: The request was aborted: Could not create SSL/TLS secure channel.
我可以通过使用 Visual Studio 发布配置文件来部署到应用服务,但我不知道出了什么问题。还可以使用相同的代理部署(使用相同的任务)到较旧的应用服务,不会出现任何问题。
这是任务的更多调试输出
2022-08-29T06:58:36.9268188Z ##[debug]Evaluating condition for step: 'Azure App Service Deploy: <web-app-name>'
2022-08-29T06:58:36.9271015Z ##[debug]Evaluating: SucceededNode()
2022-08-29T06:58:36.9271936Z ##[debug]Evaluating SucceededNode:
2022-08-29T06:58:36.9273450Z ##[debug]=> True
2022-08-29T06:58:36.9274425Z ##[debug]Result: True
2022-08-29T06:58:36.9275585Z ##[section]Starting: Azure App Service Deploy: <web-app-name>
2022-08-29T06:58:36.9487953Z ==============================================================================
2022-08-29T06:58:36.9488451Z Task : Azure App Service deploy
2022-08-29T06:58:36.9489776Z Description : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2022-08-29T06:58:36.9490336Z Version : 4.209.0
2022-08-29T06:58:36.9490876Z Author : Microsoft Corporation
2022-08-29T06:58:36.9491317Z Help : https://aka.ms/azureappservicetroubleshooting
2022-08-29T06:58:36.9491850Z ==============================================================================
...
2022-08-29T06:58:53.9440557Z ##[debug]Constructed msDeploy comamnd line arguments
2022-08-29T06:58:53.9695944Z ##[debug]Unsupported installed version: 0 found for MSDeploy. version should be at least 3 or above
2022-08-29T06:58:53.9697127Z ##[debug]System.DefaultWorkingDirectory=C:\agent\_work\6\s
2022-08-29T06:58:53.9702761Z ##[debug]the argument string is:
2022-08-29T06:58:53.9705491Z ##[debug] -verb:sync -source:package="'C:\agent\_work\6\s\temp_web_package_07978929917578559.zip'" -dest:auto,ComputerName="'https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>'",UserName="'$<web-app-name>'",Password="'***'",AuthType="'Basic'" -setParam:name="'IIS Web Application Name'",value="'<web-app-name>'" -enableRule:AppOffline -retryAttempts:6 -retryInterval:10000 -enableRule:DoNotDeleteRule -userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0
2022-08-29T06:58:53.9709265Z ##[debug]converting the argument string into an array of arguments
2022-08-29T06:58:53.9710317Z ##[debug]the array of arguments is:
2022-08-29T06:58:53.9711711Z ##[debug]arg#0: -verb:sync
2022-08-29T06:58:53.9713334Z ##[debug]arg#1: -source:package='C:\agent\_work\6\s\temp_web_package_07978929917578559.zip'
2022-08-29T06:58:53.9715273Z ##[debug]arg#2: -dest:auto,ComputerName='https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>',UserName='$<web-app-name>',Password='***',AuthType='Basic'
2022-08-29T06:58:53.9717577Z ##[debug]arg#3: -setParam:name='IIS Web Application Name',value='<web-app-name>'
2022-08-29T06:58:53.9718612Z ##[debug]arg#4: -enableRule:AppOffline
2022-08-29T06:58:53.9719669Z ##[debug]arg#5: -retryAttempts:6
2022-08-29T06:58:53.9720427Z ##[debug]arg#6: -retryInterval:10000
2022-08-29T06:58:53.9721771Z ##[debug]arg#7: -enableRule:DoNotDeleteRule
2022-08-29T06:58:53.9722766Z ##[debug]arg#8: -userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0
2022-08-29T06:58:53.9724003Z ##[debug]which 'msdeploy'
2022-08-29T06:58:53.9725442Z ##[debug]found: 'C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe'
2022-08-29T06:58:53.9729462Z ##[debug]C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe arg: ["-verb:sync","-source:package='C:\\agent\\_work\\6\\s\\temp_web_package_07978929917578559.zip'","-dest:auto,ComputerName='https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>',UserName='$<web-app-name>',Password='***',AuthType='Basic'","-setParam:name='IIS Web Application Name',value='<web-app-name>'","-enableRule:AppOffline","-retryAttempts:6","-retryInterval:10000","-enableRule:DoNotDeleteRule","-userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0"]
2022-08-29T06:58:53.9734022Z ##[debug]C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe arg: ["-verb:sync","-source:package='C:\\agent\\_work\\6\\s\\temp_web_package_07978929917578559.zip'","-dest:auto,ComputerName='https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>',UserName='$<web-app-name>',Password='***',AuthType='Basic'","-setParam:name='IIS Web Application Name',value='<web-app-name>'","-enableRule:AppOffline","-retryAttempts:6","-retryInterval:10000","-enableRule:DoNotDeleteRule","-userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0"]
2022-08-29T06:58:53.9737060Z ##[debug]exec tool: C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe
2022-08-29T06:58:53.9738352Z ##[debug]exec tool: C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe
2022-08-29T06:58:53.9739322Z ##[debug]arguments:
2022-08-29T06:58:53.9740006Z ##[debug]arguments:
2022-08-29T06:58:53.9740678Z ##[debug] -verb:sync
2022-08-29T06:58:53.9741379Z ##[debug] -verb:sync
2022-08-29T06:58:53.9742204Z ##[debug] -source:package='C:\agent\_work\6\s\temp_web_package_07978929917578559.zip'
2022-08-29T06:58:53.9743119Z ##[debug] -source:package='C:\agent\_work\6\s\temp_web_package_07978929917578559.zip'
2022-08-29T06:58:53.9744959Z ##[debug] -dest:auto,ComputerName='https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>',UserName='$<web-app-name>',Password='***',AuthType='Basic'
2022-08-29T06:58:53.9747056Z ##[debug] -dest:auto,ComputerName='https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>',UserName='$<web-app-name>',Password='***',AuthType='Basic'
2022-08-29T06:58:53.9749279Z ##[debug] -setParam:name='IIS Web Application Name',value='<web-app-name>'
2022-08-29T06:58:53.9750909Z ##[debug] -setParam:name='IIS Web Application Name',value='<web-app-name>'
2022-08-29T06:58:53.9752248Z ##[debug] -enableRule:AppOffline
2022-08-29T06:58:53.9753313Z ##[debug] -enableRule:AppOffline
2022-08-29T06:58:53.9754028Z ##[debug] -retryAttempts:6
2022-08-29T06:58:53.9754723Z ##[debug] -retryAttempts:6
2022-08-29T06:58:53.9755432Z ##[debug] -retryInterval:10000
2022-08-29T06:58:53.9756145Z ##[debug] -retryInterval:10000
2022-08-29T06:58:53.9756864Z ##[debug] -enableRule:DoNotDeleteRule
2022-08-29T06:58:53.9757602Z ##[debug] -enableRule:DoNotDeleteRule
2022-08-29T06:58:53.9758413Z ##[debug] -userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0
2022-08-29T06:58:53.9759274Z ##[debug] -userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0
2022-08-29T06:58:53.9762063Z [command]"C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe" -verb:sync -source:package='C:\agent\_work\6\s\temp_web_package_07978929917578559.zip' -dest:auto,ComputerName='https://<web-app-name>.scm.azurewebsites.net:443/msdeploy.axd?site=<web-app-name>',UserName='$<web-app-name>',Password='***',AuthType='Basic' -setParam:name='IIS Web Application Name',value='<web-app-name>' -enableRule:AppOffline -retryAttempts:6 -retryInterval:10000 -enableRule:DoNotDeleteRule -userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0
2022-08-29T06:58:54.3765154Z Info: Using ID '910feaf0-3047-457f-a972-6d9e37b399f5' for connections to the remote server.
2022-08-29T06:58:54.4771138Z ##[debug]Exit code 4294967295 received from tool 'C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe'
2022-08-29T06:58:54.4773207Z ##[debug]Exit code 4294967295 received from tool 'C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe'
2022-08-29T06:58:54.4776306Z ##[debug]STDIO streams have closed for tool 'C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe'
2022-08-29T06:58:54.4777999Z ##[debug]STDIO streams have closed for tool 'C:\agent\_work\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.209.0\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy3.6\MSDeploy3.6\msdeploy.exe'
2022-08-29T06:58:54.4779606Z ##[debug]System.DefaultWorkingDirectory=C:\agent\_work\6\s
2022-08-29T06:58:54.4796284Z ##[debug]Deployment Failed with Error: Error: Error: Could not complete the request to remote agent URL 'https://<web-app-name>.scm.azurewebsites.net/msdeploy.axd?site=<web-app-name>'.
Error: The request was aborted: Could not create SSL/TLS secure channel.
Error count: 1.
同一代理还用于部署(使用相同的任务)到较旧的应用服务,不会出现任何问题。工作部署和非工作部署的调试输出有一个区别
# working
-userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_426_0
# not working
-userAgent:VSTS_8cba2559-f093-44dd-97ca-eab9368422fd_build_407_0
但我不确定它控制什么以及如何控制该值,因为它再次在同一虚拟机上运行两次。
最佳答案
Error: The request was aborted: Could not create SSL/TLS secure channel.
该问题可能与自托管代理所在的虚拟机上的 TLS 版本有关。
默认情况下,.Net6 应用服务将使用 TLS1.2。您可以导航至应用服务 -> TLS/SSL 设置来检查设置。
然后您可以导航到 Azure VM 并检查 TLS1.2 是否已启用。 PowerShell script to check TLS 1.2
如果没有,您可以使用以下脚本启用TLS1.2。
If (-Not (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319'))
{
New-Item 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Name 'SystemDefaultTlsVersions' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -PropertyType 'DWord' -Force | Out-Null
If (-Not (Test-Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319'))
{
New-Item 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Name 'SystemDefaultTlsVersions' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -PropertyType 'DWord' -Force | Out-Null
If (-Not (Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server'))
{
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Name 'Enabled' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Name 'DisabledByDefault' -Value '0' -PropertyType 'DWord' -Force | Out-Null
If (-Not (Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client'))
{
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Name 'Enabled' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Name 'DisabledByDefault' -Value '0' -PropertyType 'DWord' -Force | Out-Null
Write-Host 'TLS 1.2 has been enabled. You must restart the Windows Server for the changes to take affect.' -ForegroundColor Cyan
更详细的信息,您可以引用这个文档:PowerShell script to enable TLS 1.2
关于azure - 使用 AzureRmWebAppDeployment@4 将 net6 ASP 应用程序部署到 azure 应用程序服务时出现 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73525580/
我正在通过 labrepl 工作,我看到了一些遵循此模式的代码: ;; Pattern (apply #(apply f %&) coll) ;; Concrete example user=> (a
我从未向应用商店提交过应用,但我会在不久的将来提交。 到目前为止,我对为 iPhone 而非 iPad 进行设计感到很自在。 我了解,通过将通用PAID 应用放到应用商店,客户只需支付一次就可以同时使
我有一个应用程序,它使用不同的 Facebook 应用程序(2 个不同的 AppID)在 Facebook 上发布并显示它是“通过 iPhone”/“通过 iPad”。 当 Facebook 应用程序
我有一个要求,我们必须通过将网站源文件保存在本地 iOS 应用程序中来在 iOS 应用程序 Webview 中运行网站。 Angular 需要服务器来运行应用程序,但由于我们将文件保存在本地,我们无法
所以我有一个单页客户端应用程序。 正常流程: 应用程序 -> OAuth2 服务器 -> 应用程序 我们有自己的 OAuth2 服务器,因此人们可以登录应用程序并获取与用户实体关联的 access_t
假设我有一个安装在用户设备上的 Android 应用程序 A,我的应用程序有一个 AppWidget,我们可以让其他 Android 开发人员在其中以每次安装成本为基础发布他们的应用程序推广广告。因此
Secrets of the JavaScript Ninja中有一个例子它提供了以下代码来绕过 JavaScript 的 Math.min() 函数,该函数需要一个可变长度列表。 Example:
当我分别将数组和对象传递给 function.apply() 时,我得到 NaN 的 o/p,但是当我传递对象和数组时,我得到一个数字。为什么会发生这种情况? 由于数组也被视为对象,为什么我无法使用它
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界. 这篇CFSDN的博客文章ASP转换格林威治时间函数DateDiff()应用由作者收集整理,如果你
我正在将列表传递给 map并且想要返回一个带有合并名称的 data.frame 对象。 例如: library(tidyverse) library(broom) mtcars %>% spl
我有一个非常基本的问题,但我不知道如何实现它:我有一个返回数据框,其中每个工具的返回值是按行排列的: tmp<-as.data.frame(t(data.frame(a=rnorm(250,0,1)
我正在使用我的 FB 应用创建群组并邀请用户加入我的应用群组,第一次一切正常。当我尝试创建另一个组时,出现以下错误: {"(OAuthException - #4009) (#4009) 在有更多用户
我们正在开发一款类似于“会说话的本”应用程序的 child 应用程序。它包含大量用于交互式动画的 JPEG 图像序列。 问题是动画在 iPad Air 上播放正常,但在 iPad 2 上播放缓慢或滞后
我关注 clojure 一段时间了,它的一些功能非常令人兴奋(持久数据结构、函数式方法、不可变状态)。然而,由于我仍在学习,我想了解如何在实际场景中应用,证明其好处,然后演化并应用于更复杂的问题。即,
我开发了一个仅使用挪威语的应用程序。该应用程序不使用本地化,因为它应该仅以一种语言(挪威语)显示。但是,我已在 Info.plist 文件中将“本地化 native 开发区域”设置为“no”。我还使用
读完 Anthony's response 后上a style-related parser question ,我试图说服自己编写单体解析器仍然可以相当紧凑。 所以而不是 reference ::
multicore 库中是否有类似 sapply 的东西?还是我必须 unlist(mclapply(..)) 才能实现这一点? 如果它不存在:推理是什么? 提前致谢,如果这是一个愚蠢的问题,我们深表
我喜欢在窗口中弹出结果,以便更容易查看和查找(例如,它们不会随着控制台继续滚动而丢失)。一种方法是使用 sink() 和 file.show()。例如: y <- rnorm(100); x <- r
我有一个如下所示的 spring mvc Controller @RequestMapping(value="/new", method=RequestMethod.POST) public Stri
我正在阅读 StructureMap关于依赖注入(inject),首先有两部分初始化映射,具体类类型的接口(interface),另一部分只是实例化(请求实例)。 第一部分需要配置和设置,这是在 Bo
我是一名优秀的程序员,十分优秀!