简体   繁体   中英

Blob triggered Azure function doesn't work deployed but works locally, and no sign of any error

Here's my Azure function made with VS2017 15.6.0 Preview 1.1 - https://github.com/alvipeo/azfunc . It perfectly works when I run it locally with VS.

I created a CI/CD pipeline with VSTS. No errors there too, all deployed successfully.

I set all settings in Azure, so it should work when deployed. But it doesn't. And what's more, I see NO SIGN of errors or any log records anywhere (but I enabled everything in the Diagnostics and I have App Insights).

Thanks to Microsoft engineers, it's solved. Here's what needs to be done:

  1. When function is built in VS2017 for .NET Core 2.0 and deployed with VSTS, for some reason runtime version in Azure is set to 1. But when I run it locally I see the runtime version = 2. So you need to set in Azure this setting FUNCTIONS_EXTENSION_VERSION=~2
  2. When you use blob triggered Azure Function you can't use Blob-only Storage accounts (and I used the one). You have to use General Purpose storage account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM