我是 .NET 世界的初学者,正在尝试让我的第一个虚拟 .NET Core Web 应用程序在 Azure 应用服务上运行。
代码可以在这里找到: https://github.com/jordi-chacon/bcn_pollution
我的开发机器运行 Ubuntu,因此我使用 Visual Studio Code。
我目前的 .NET Core Web 应用程序在 localhost:5000 上运行得很好,现在我希望它在 Azure 应用服务上运行。
我已成功在我的应用服务上配置持续部署以从 Github 获取代码。
然后 Azure 尝试部署我的 Web 应用程序,但失败并出现以下错误:
Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --aspNet5 "D:\home\site\repository\project.json" --aspNet5Version "1.0.0-rc1-final" --aspNet5Runtime "CLR" --aspNet5Architecture "x86"'.
Project file path: .\project.json
Generating deployment script for ASP.NET 5 Application
Generated deployment script files
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET 5 Web Application deployment.
Downloading dnx-clr-win-x86.1.0.0-rc1-final from https://www.nuget.org/api/v2
Unable to download package: An exception occurred during a WebClient request.
At C:\Program Files
(x86)\SiteExtensions\Kudu\50.41223.1987\bin\scripts\dnvm.ps1:694 char:13
+ throw "Unable to download package: {0}" -f
$Global:downloadData.Erro ...
+
Failed exitCode=1, command=PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='"D:\local\UserProfile\.dnx\temp-set-envvars.cmd"';& 'C:\Program Files (x86)\SiteExtensions\Kudu\50.41223.1987\bin\scripts\dnvm.ps1' " install 1.0.0-rc1-final -arch x86 -r CLR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to downl...Client requ
An error has occurred during web site deployment.
est.:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to download package: An exception occurred during a WebClient request.
有人知道我做错了什么吗? 谢谢!
最佳答案
我猜您遇到了磁盘空间不足的问题。 https://github.com/projectkudu/kudu/issues/1682
我尝试了你的代码,并重现了部署失败。
当导航到 https://{site name}.scm.azurewebsites.net 时,我看到以下消息
解析器错误消息:磁盘上没有足够的空间。
默认情况下,免费站点有 1 GB 磁盘空间,但 ASP.NET 5 应用程序类型需要大量依赖项并且很容易超出限制,这似乎是一个已知问题。他们(Asp.net 5 人员)正在努力解决这个问题。
walk-around 是部署到基本或标准站点
关于asp.net - 将 .NET Core Web 应用程序部署到 Azure 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34620408/