Azure函数-发布失败-RequestTimeout [英] Azure Function - Publishing Failed - RequestTimeout
问题描述
我有一个基本的Azure Function应用.当我尝试发布该应用程序时,收到一条错误消息:错误:尝试通过https://...发布ZIP文件的操作失败,并显示HTTP状态代码RequestTimeout.".
I have a basic Azure Function app. When I try to publish the app, I receive an error that says "error : The attempt to publish the ZIP file through https://... failed with HTTP status code RequestTimeout.".
This app is a .NET Standard app. I followed the instructions here. The difference is, my app has an Event Hub Trigger instead of the Http Trigger shown in the documentation. I don't understand why i'm getting a Timeout during deployment. I also don't know how to get past this.
我在做什么错了?
更新
这是日志.
1>------ Build started: Project: MyProject.Functions, Configuration: Release Any CPU ------
1>MyProject.Functions -> C:\MyProject\MyProject.Functions\bin\Release\netcoreapp2.1\bin\MyProject.Functions.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Publish Started
MyProject.Functions -> C:\MyProject\MyProject.Functions\bin\Release\netcoreapp2.1\bin\MyProject.Functions.dll
MyProject.Functions -> C:\MyProject\MyProject.Functions\obj\Release\netcoreapp2.1\PubTmp\Out\
Publishing C:\MyProject\MyProject.Functions\obj\Release\netcoreapp2.1\PubTmp\MyProject.Functions - 20181101105531356.zip to https://my-project.scm.azurewebsites.net/api/zipdeploy...
C:\Users\me\.nuget\packages\microsoft.net.sdk.functions\1.0.23\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Publish.ZipDeploy.targets(42,5): error : The attempt to publish the ZIP file through https://my-project.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code RequestTimeout. [C:\MyProject\MyProject.Functions\MyProject.Functions.csproj]
推荐答案
据此: https://github.com/projectkudu/kudu/wiki/从一个zip文件部署
您应该能够将?isAsync=true
传递到zipdeploy网址(因此应为:' https://my-project.scm.azurewebsites.net/api/zipdeploy?isAsync=true '
you should be able to pass ?isAsync=true
to the zipdeploy url (so it would be: 'https://my-project.scm.azurewebsites.net/api/zipdeploy?isAsync=true'
此请求的解析速度更快,而且没有超时,然后您可以从响应中获取位置标头,然后可以对其进行轮询以查看部署状态.
This requests resolves faster without a timeout and then you can grab the location header from the response, which you can poll to see the status of your deployment.
这篇关于Azure函数-发布失败-RequestTimeout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!