【问题标题】:Unable to deploy ASP.NET 5 (ASP.NET Core 1) to Azure: not enough space无法将 ASP.NET 5 (ASP.NET Core 1) 部署到 Azure:空间不足
【发布时间】:2016-02-23 14:38:41
【问题描述】:

我正在尝试将官方教程Create an ASP.NET 5 web app in Visual Studio Code 中的基本 vanila Api 应用程序部署到 Azure,但我遇到了“磁盘空间不足”的问题。我是 Azure 的新手,我正在使用试用帐户。

我可以做些什么来使部署精简且不超过磁盘空间?

完整的错误堆栈:

remote: Restore failed
remote: There is not enough space on the disk.
remote:
remote:
remote: Feeds used:
remote:     https://api.nuget.org/v3-flatcontainer/
remote: An error has occurred during web site deployment.
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.

【问题讨论】:

  • 你的应用的大小是多少?
  • 我认为您需要创建一个块存储并将其分配给您的虚拟机或应用程序服务,据我所知,默认情况下不包含它。您按使用的 GB 支付的块存储空间
  • 这是一个已知问题,Git 持续部署到应用服务的免费/共享层没有足够的临时存储来恢复所有需要的包。一种解决方法是从 Visual Studio 发布...github.com/aspnet/dnx/issues/3192

标签: asp.net azure asp.net-core


【解决方案1】:

跨平台免费/共享层解决方案

即使没有免费试用,我们也可以将 ASP.NET Core RC1 应用程序发布到免费/共享的 Azure Web 应用程序。使用dnu publish,然后使用 FTP 部署。这适用于跨平台。我们不需要 Visual Studio、msbuild、Web Deploy 或免费的 Azure 试用版。

这是一个例子。

示例步骤

(1) 将 rc1-final 与 Core CLR 一起使用。 (2) 然后用Yeoman 搭建应用程序。 (3) 接下来,恢复包。 (4) 最后,发布申请;请务必在输出中包含 active 运行时。

C:\> dnvm use 1.0.0-rc1-final -runtime coreclr                       (1)
C:\> yo aspnet webbasic MyApp                                        (2) 
C:\MyApp> cd MyApp
C:\MyApp> dnu restore                                                (3)
C:\MyApp> dnu publish --configuration release -runtime active        (4)

该包位于MyApp\bin\output 目录中。使用 FTP 将其部署到免费/共享的 Azure Web 应用程序。第一次部署大约需要 15-20 分钟,因为我们包含了每个包和运行时。

C:\MyApp\bun\output              /site

approot                          approot
log                                   
wwwroot                          wwwroot

我们需要将approot 和wwwroot 发布到site 目录。

示例结果

【讨论】:

    【解决方案2】:

    正如 Anthony Chew 所说,这似乎是一个已知问题。

    我的解决方案是将我的订阅升级到 Basic - 仍然是免费试用的一部分。

    【讨论】:

      猜你喜欢
      • 2016-05-22
      • 1970-01-01
      • 2016-06-01
      • 1970-01-01
      • 2021-05-08
      • 1970-01-01
      • 2020-03-06
      • 1970-01-01
      • 2021-01-11
      相关资源
      最近更新 更多