ASP.Net Core无法发布到Azure App Service

时间:2016-09-27 08:50:32

标签: visual-studio-2015 asp.net-core azure-web-sites azure-web-app-service web-publishing

我有一个ASP.Net核心Web应用程序(DotNetCore.1.0.1 VS2015Tools.Preview2.0.2),我试图通过Visual Studio将其发布到Azure App Service。

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
}

0 个答案:

没有答案