我有一个ASP.Net核心Web应用程序(DotNetCore.1.0.1 VS2015Tools.Preview2.0.2),我试图通过Visual Studio发布到Azure应用程序服务 .
Azure应用服务和资源组都是全新的 .
“执行命令[”C:\ Program Files(x86)\ IIS \ Microsoft Web Deploy V3 \ msdeploy.exe“'几分钟后,发布过程失败 . “Visual Studio中的'web发布活动'日志说”由于发生套接字错误(10054)而重试同步 . 重试对象sitemanifest上的操作'序列化'(sourcePath)尝试100的100 . “还有更多的错误100,但这是第一个 .
我有这个问题很多ASP.Net核心,从来没有真正解决它,因为它似乎只是偶尔工作 .
谁能摆脱任何光明?
我的Publish.ps1如下
[cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties=@{}, $packOutput, $pubProfilePath)
# to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327
try{
if ($publishProperties['ProjectGuid'] -eq $null){
$publishProperties['ProjectGuid'] = '28343c8d-220f-435e-9b48-bf90a3b9068d'
}
$publishModulePath = Join-Path (Split-Path $MyInvocation.MyCommand.Path) 'publish-module.psm1'
Import-Module $publishModulePath -DisableNameChecking -Force
# call Publish-AspNet to perform the publish operation
Publish-AspNet -publishProperties $publishProperties -packOutput $packOutput -pubProfilePath $pubProfilePath
}
catch{
"An error occurred during publish.`n{0}" -f $_.Exception.Message | Write-Error
}