将.NET Core Webapp部署到Azure时出错

时间:2016-01-05 20:11:54

标签: asp.net azure

我是.NET世界的初学者,试图让我的第一个虚拟.NET Core webapp在Azure App Service上运行。

代码可以在这里找到: https://github.com/jordi-chacon/bcn_pollution

我的开发机器运行Ubuntu,所以我使用的是Visual Studio Code。

我目前在localhost上运行我的.NET Core webapp:5000就好了,现在我想让它在Azure App Service上运行。

我已在App Service上成功配置持续部署,以从Github获取代码。

然后Azure尝试部署我的webapp但它失败并出现以下错误:

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.

任何人都知道我做错了什么? 谢谢!

1 个答案:

答案 0 :(得分:3)

我猜你的磁盘空间问题不够。 https://github.com/projectkudu/kudu/issues/1682

我尝试了您的代码,并重新调试部署失败。

导航到https:// {site name} .scm.azurewebsites.net时,我看到以下消息

Parser Error Message: There is not enough space on the disk.

默认情况下,免费网站有1 GB的磁盘空间,但似乎这是一个已知的问题,asp.net 5应用程序类需要很多依赖并轻松超过限制。他们(Asp.net 5人)正致力于解决这个问题。

四处走动是部署到基本或标准网站