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
24
votes
3 answers

Azure Container Instances vs Azure Functions

When would I prefer Azure Functions to Azure Container Instances, considering they both offer the possibility to perform run-once tasks and they bill on consumption? Also, reading this Microsoft Learn Module: Serverless compute can be thought of as…
Alberto
  • 783
  • 1
  • 7
  • 15
24
votes
2 answers

Azure Function, returning status code + JSON, without defining return in every part of logic

I have an Azure Function 2.x that reside on a static class that looks like this [FunctionName("Register")] public static async Task Run([HttpTrigger(AuthorizationLevel.Anonymous, "post")]HttpRequest req, ILogger log) { MyTypeClass…
Tommy Aria Pradana
  • 574
  • 1
  • 4
  • 18
24
votes
3 answers

Getting error "Failed to decrypt settings..." when trying to start Azure bot function

We have a bot endpoint implemented as an Azure function and it's running fine within Azure. We've followed this process to enable us to run/debug the Azure Function…
Michael12345
  • 2,520
  • 5
  • 23
  • 41
24
votes
2 answers

How do I use Binder to perform dynamic bindings in my C# Function?

I need to bind to an output blob, but the blob path needs to be computed dynamically in my function. How do I do it?
mathewc
  • 13,312
  • 2
  • 45
  • 53
24
votes
7 answers

How to get client IP address in Azure Functions C#?

I'm writing a function in C# using Azure Functions and need to get the ip address of the client that called the function, is this possible?
TerryB
  • 529
  • 2
  • 5
  • 12
23
votes
2 answers

context.log vs console.log in Azure function apps

In the nodejs examples for Azure function apps, there is a passed in context obj to the function and it is possible to do context.log in the same manner as you can with console.log to output messages. What is the difference between these two methods…
yen
  • 1,769
  • 2
  • 15
  • 43
23
votes
3 answers

Adding custom headers to Azure Functions response

I'm working on an Azure Function App (v2), which has a number of different functions inside the same Function App. It is going to be deployed in multiple Azure regions, and I would like to add a custom header, that indicates which region served the…
RasmusW
  • 3,355
  • 3
  • 28
  • 46
23
votes
5 answers

Azure Function, EF Core, Can't load ComponentModel.Annotations 4.2.0.0

I have created several .Net Standard 2.0 libraries, tested the execution via a console application, as well as several tests - all is good. Move over to azure function, and get the following run-time error: I then try to download that specific…
codeputer
  • 1,987
  • 3
  • 19
  • 45
23
votes
14 answers

The listener for function was unable to start. Why?

I'm getting the following error when I run the azure function from visual studio. A ScriptHost error has occurred [1/19/2018 6:40:52 AM] The listener for function 'MyFunctionName' was unable to start. Microsoft.WindowsAzure.Storage: Server…
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197
23
votes
3 answers

Authentication for Azure Functions

I've spent the past 24 hours reading all about how to create Azure Functions and have successfully converted a MVC WebApi over to a new Function App with multiple functions. My problem is that I've not found any clear documentation or tutorials on…
ThatCreole
  • 495
  • 1
  • 7
  • 17
23
votes
3 answers

Target .NET Core 2.0 with Azure Functions in Visual Studio 2017

Since Microsoft has released .NET Core 2.0 for Azure Functions a few days ago, I'm trying to understand how to create a new Functions project in VS2017 targeting .NET Core. I've tried many configurations and still ended up with .NET 4.7. Did anyone…
NOP-MOV
  • 792
  • 2
  • 8
  • 28
23
votes
3 answers

Run .exe executable file in Azure Function

I have executable abcd.exe (it contains/merged with many .dll). Is it possible to create Azure Function for abcd.exe and run it in Azure Cloud Functions? The abcd.exe application : System.Diagnostics.Process process = new…
Ves
  • 347
  • 1
  • 3
  • 8
22
votes
3 answers

Failed to resolve for reference Microsoft.Azure.WebJobs.Extensions - Metadata generation failed

Had to pick up a bit of work from another developer so just trying to wrap my head round it all! But I'm having issues building an Azure Functions project and continuously getting a error coming form Microsoft.NET.Sdk.Functions.Build.targets ,…
benbants
  • 590
  • 7
  • 30
22
votes
10 answers

Azure Cosmos DB input binding for an Azure Function doesn't work

I was following a walkthrough from microsoft learning on how to add an input binding with CosmosDb for an azure function, however when calling the function it keeps returning internal server error (500 http code). The configuration of the azure…
csg
  • 2,047
  • 2
  • 22
  • 35
22
votes
6 answers

Get root directory of Azure Function App v2

I build an Azure Function App (v2). Configuration tasks necessary for all functions are done in a Setup class that is structured like the following: [assembly: WebJobsStartup(typeof(Startup))] internal class Startup : IWebJobsStartup { public…