Questions tagged [azure-functions]

Azure Functions is an event-driven serverless compute platform in Azure and Azure Stack. Its open-source runtime also works on multiple destinations including Kubernetes, Azure IoT Edge, on-premises, and other clouds.

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Java, or PHP. Pay only for the time your code runs and trust Azure to scale as needed. Azure Functions lets you develop serverless applications on Microsoft Azure.


###Getting Started

15299 questions
41
votes
5 answers

Visual Studio 2019 Re-Downloads Azure Function CLI Tools

I am trying to write a couple of Azure functions (version 2) using Visual Studio 2019. The first time I try to run them I get the following message: The functions run but if I restart VS and try to run the function again it downloads the tools…
Mark Wagoner
  • 1,729
  • 1
  • 13
  • 20
41
votes
7 answers

The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program

Created Powershell Azure function and trying to use "az" commands under that function app. As per docs, function runtime should resolve "az" and other module dependencies. but it doesn't work for me. ERROR: The term 'az' is not recognized as the…
Pankaj Rawat
  • 4,037
  • 6
  • 41
  • 73
41
votes
6 answers

Reading settings from a Azure Function

I'm new to Azure's function... I've created a new timer function (will be fired every 30 minutes) and it has to perform a query on a URL, then push data on the buffer.. I've done public static void Run(TimerInfo myTimer, TraceWriter log) { var s =…
advapi
  • 3,661
  • 4
  • 38
  • 73
41
votes
4 answers

Best place to store environment variables for Azure Function

I'm testing an azure function locally with several api keys. Whats the best place to store environment variables and how do I access them? I tried System.Environment.GetEnvironmentVariable("name") but I'm not sure where the environment variable is…
DarthVadar123451
  • 619
  • 1
  • 6
  • 14
40
votes
4 answers

Azure Functions - Limiting parallel execution

Is it possible to limit the maximum number of Functions that run in parallel? I read the documentation and came across this: When multiple triggering events occur faster than a single-threaded function runtime can process them, the runtime may…
Chris
  • 3,113
  • 5
  • 24
  • 46
39
votes
11 answers

DI in Azure Functions

I have some class libraries that I use in my ASP.NET Web API app that handle all my backend stuff e.g. CRUD operations to multiple databases like Azure SQL Database, Cosmos DB, etc. I don't want to re-invent the wheel and able to use them in a new…
Sam
  • 26,817
  • 58
  • 206
  • 383
39
votes
1 answer

How To Configure Queue Name for Queue Trigger In Azure Function App

I'm creating a function app in Azure and want to use a queue trigger. I know how to configure the queue name at design time, e.g: [FunctionName("MyTestFunction")] public static void Run([QueueTrigger("myqueue-items", Connection =…
Steviebob
  • 1,705
  • 2
  • 23
  • 36
38
votes
3 answers

How do I turn on "always-on" for an Azure Function?

I have a Function App with 3 functions, one of them timer-triggered every 2 minutes. I observed that after a while, the function stops being triggered, but restarts when I go to the portal. As I understand it, the reason is that by default, "Always…
Mathias
  • 15,191
  • 9
  • 60
  • 92
37
votes
4 answers

Azure Functions: Queue Trigger is expecting Base-64 messages and doesn't process them correctly

I have this Queue Trigger. The expected is when I insert a message in the Queue, the trigger must fire and process the dequeued message. [FunctionName("NewPayrollQueueTrigger")] public async static void Run([QueueTrigger("myqueue",…
Ramon Dias
  • 835
  • 2
  • 12
  • 23
36
votes
5 answers

Azure Functions and Caching

We are planning to develop an Azure function for which the input trigger is a service bus message and the output will be blob storage. The service bus message will contain a image url and the function will resize the image to a predefined resolution…
Silly John
  • 1,584
  • 2
  • 16
  • 34
36
votes
4 answers

Azure Functions Temp storage

When I try to save a file to the Temp storage in Azure Functions directory (D:\home\data\temp\response.pdf), I get the following error. Why can't I write to this directory? mscorlib: Exception has been thrown by the target of an invocation. System:…
naag
  • 401
  • 1
  • 4
  • 4
36
votes
4 answers

Throttling Azure Storage Queue processing in Azure Function App

I have created an Azure Function app with an Azure Storage Queue trigger that processes a queue in which each queue item is a URL. The Function just downloads the content of the URL. I have another function that loads and parses a site's XML…
Alex
  • 2,795
  • 3
  • 21
  • 21
35
votes
7 answers

How to get a Shared Access Signature on a Blob using the latest Azure SDK .NET API v12?

I used to be able to create a shared access signature on a Blob using the v11 Azure SDK API, like this: var containerName = "mycontainer"; var blobName = "myblob"; CloudStorageAccount storageAccount =…
Kzryzstof
  • 7,688
  • 10
  • 61
  • 108
34
votes
4 answers

Version conflict caused by Microsoft.NET.Sdk.Functions

I'm having issues with a project referencing 2 packages that then reference Newtonsoft.Json but both at different versions. I'm using the nuget package of Refit and Microsoft.NET.Sdk.Functions. When I try to build the solution I get the following…
Kevin Smith
  • 13,746
  • 4
  • 52
  • 77
33
votes
23 answers

Error when trying to publish an azure function from Visual Studio

I get the following error message when I try to publish my function using Visual Studio, any idea how to fix this? System.AggregateException: One or more errors occurred. ---> System.Exception: Publish has encountered an error. We were unable to …
Recusiwe
  • 1,594
  • 4
  • 31
  • 54