Questions tagged [azure-functions]

1

votes
1

answer
1.5k

Views

How to access azure service bus message properties in Azure function 2

Using azure functions version 1 it was possible to accept a message as BrokeredMessage. public static void Run([ServiceBusTrigger('MySServiceBus', 'MySubscriptionName', AccessRights.Listen, Connection = 'MyConnectionString')]BrokeredMessage message, TraceWriter log) And then retrieve the properties...
Andy Rich
1

votes
1

answer
951

Views

How to create a Azure Function, Function Key when your functions are set to Readonly

Summary: I'm authoring a function directly in Visual Studio which by design results in readonly function management in the portal. My question is how does one easily create a function key for said webhook? Context: I'm trying to hook up a generic webhook to Event Grid. This process has led me down...
ThatCreole
1

votes
2

answer
281

Views

Does azure functions share context between the running instances?

I'm working on one project based on the Azure Functions, and I have one static helper class with buffer (private static ConcurrentDictionary) which holds some list of items to be processed at the end of execution, the question does this buffer will be shared between the multiple running instances?
1

votes
2

answer
183

Views

Azure Functions v2 & Google Auth

I've set up my Azure Functions 2 in the manner described in this post https://blogs.msdn.microsoft.com/stuartleeks/2018/02/19/azure-functions-and-app-service-authentication/ I can call the /.auth/login/google endpoint with the Google token and get back the easy auth token. And I can call the /.auth/...
Bon
1

votes
1

answer
140

Views

Use Azure Function Binding to return list of Blobs in a Container

Perhaps I'm misunderstanding the purpose of Azure Function Input Bindings. But I want to be able to return the list of blobs in a container on a HttpTrigger using a blob input binding. Is this possible or do I need to access the Blob Storage API directly from the Function?
BenBtg
1

votes
1

answer
628

Views

Passing parameter to Azure Function (HttpTrigger) in URL as querystring

Created a new Azure Function in Visual Studio 2017 (HTTPTrigger based) and having difficulty passing parameters with custom route. Below is the code excerpt: [FunctionName('RunTest')] public static async Task Run( [HttpTrigger(AuthorizationLevel.Function, 'get', 'post', Route = 'orchestrators/contos...
Karthik
0

votes
1

answer
80

Views

Azure function visibilityTimeout

When i read the documentation about visibilityTimeout: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue#host-json it says 'The time interval between retries when processing of a message fails.'. How I understands this is that if the timeout is set to 30 seconds...
mslot
0

votes
0

answer
6

Views

HTTP 502: When Keeping Warm a function with another scheduled function

I have an HTTP triggered Consumption plan Azure Function that I want to keep warm by POSTing an empty payload to it regularly. I am doing this with a Scheduled Function with this configuration: __init__.py import os import datetime import logging import azure.functions as func import urllib.parse, u...
user1965074
0

votes
1

answer
25

Views

Handle multiple messages from IoT hub in one c# azure function session

I need to process messages from IoT devices and so far I have been fine with my workflow (IoT device sends message to IoT Hub and IoT Hub triggered Azure Function processes the message and saves the information into Azure SQL). But now I have a device which sends the whole information in two separat...
soldous
1

votes
1

answer
70

Views

Azure Functions “Consumption Plan” HIPAA Compliance

Since Azure Functions host are dynamically added and removed based on the number of incoming events under 'Consumption Plan', what is the guarantee that Azure transparently encrypts the data in-transit as well as at-rest on the hosts? Are there any documentations which can share some light on how Az...
dilzfiesta
1

votes
1

answer
94

Views

Azure Function - Report a faliure

I developed an azure function and deployed it in my subscription. Initially I had hard time setting up correct connection string and that lead Azure Function to fail functionally. But Azure reported it to be successful because the exception generated by code was handled. How do you report a failure...
Hiren Desai
1

votes
1

answer
262

Views

Redis connection best practices for use with an Azure Consumption Function

Redis best practices recommendeds using a long-lived ConnectionMultiplexer. However I want to use Redis inside an azure consumption function that may only live a couple of seconds (but runs many times). I was wondering if I had code like this: private static Lazy lazyRedisConnection = new Lazy(() =>...
Red Riding Hood
1

votes
1

answer
211

Views

function app equivalent for IHostingEnvironment.IsDevelopment()

In asp.net core Startup.cs Configure we are provided an IHostingEnvironment env parameter that exposes an env.IsDevelopment() call to determine if you are currently running in a visual studio f5 debug session or a cloud deployment scenario. In function app is there a story for determining this same...
myusrn
1

votes
2

answer
293

Views

Azure Service bus 2.0 version trigger is not working in server

I created one console for sending message to Azure Service bus topic and created to one service bus topic trigger. In locally it's working fine, but the same code is not working after deploy the same function in azure. I am new for Azure, Please help to solve the issue and take my code details bel...
Rama Krishnan
1

votes
1

answer
70

Views

How to implement azure async functions with output parameters

I implemented Azure function. I have next case: When something uploaded to blob (Input Blob is trigger) Process logic Save something to output blob (Output as return value) Save something else to dynamo db collection (Output parameter) Save something else to another dynamo db collection (Output para...
Raskolnikov
0

votes
0

answer
22

Views

Visual Studio 2019 fails to add a new file to my project

I have a functions app project called Gorge.FunctionApp with the file path D:\Kernelgen\Platform\Gorge\gorge-products-catalog\Gorge.FunctionApp. However, when I try to add a new function, the dialog box just does not show up. When hit Ctrl+Shift+A to add a new file, I get the error as shown in the p...
Conrad
1

votes
0

answer
539

Views

Azure Function Key Vault Attribute Binding

Can you use key vault secrets instead of appsettings.json on attribute bindings e.g. [FunctionName('QueueMessageHandler')] public static void Run( [QueueTrigger(queueName: '%queueName%', Connection = '%connection%')]string myQueueItem) { *** function code here *** } so my variables %queueName% and...
Mark West
1

votes
1

answer
242

Views

Fault tolerance in Copy Activity by skipping incompatible rows

I use Azure Fucntion with Azure SDK and Azure Data Factory, is there any way to get value of skippedRowCount of Activity Window when applying 'log the incompatible rows' in Copy Activity (Source: Blob Storage, Sink: SQL Data Warehouse)?
phương hà
1

votes
0

answer
75

Views

Missing assembly when running functions locally

When running my Azure Function (C#) locally i get these error messages: A ScriptHost error has occurred The type initializer for 'Microsoft.Azure.Documents.DefaultTrace' threw an exception. Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyTo...
fUrious
1

votes
1

answer
618

Views

How do I let an executing azure function complete during a shut down?

Active functions are killed when a Function App is restarted which includes restarts, stop/starts, publishing on top, and swapping deployment slots. For a functions that are run frequently, that's a problem. We are sticking with the goal of our functions to be very fast running. Maybe a few second...
retsvek
1

votes
1

answer
95

Views

Azure Function Publish with Sources

How can I include the sources (for later Remote Debugging) when publishing for an Azure Function. I was looking for an option for the .pubxml file. I did not see any option in the GUI itself. I tried with Copy if Newer But nothing changed in the Cloud Explorer. I could not see the source files an...
Matthias
1

votes
0

answer
81

Views

Deploy Azure function from C# code

Is it possible to deploy Azure Function runtime (i-e like we can create service bus topic subscription using c# code). We have requirement that Azure Function triggers automatically on multiple service bus topics(s) subsciprtion(s). But azure function can only trigger on one service bus topic subscr...
Ather Tahir
1

votes
1

answer
112

Views

Azure Function and WindowsAzure.Storage version (DLL Hell)

With VS 2017 latest update I'm creating a Azure Function project. Apparently this has a hard reference to WindowsAzure.Storage 7.2.1 build from September 2016(!) that is also referring other packages like OData, JSON etc. Is it really advisable to downgrade to 7.2.1? (to be safe I would downgrade OD...
Stig
1

votes
1

answer
149

Views

Error while fetching function key using powershell script

I have a http triggered azure function whose function key I need to populate during deployment itself. I am currently trying to get the function key using the process given here (only instead of calling the host key API I am calling the function key API /admin/functions/$functionName/keys?code=$mast...
raghav710
1

votes
0

answer
75

Views

How can I use app.config and read using ConfigurationManager in azure function

How can I create an app.config file and use ConfigurationManager.appSettings to read the config in azure function
demalegabi
1

votes
0

answer
2.6k

Views

Azure function returning 401 Unauthorized

I have an Azure function app with several functions in it. They were deployed using VSTS source control integration. Everything used to work both locally and in the deployed version. But now if I change the code, it triggers a build and deployment. Both complete successfully, but I don't see my fun...
Yasir
1

votes
1

answer
267

Views

ExceptionFilterAttribute in Azure Functions

I'm trying to migrate a WebAPI application to Azure Functions. I have searched on the net and haven't found anything equivalent to ExceptionFilterAttribute supported in Azure Functions. Does this mean that to migrate this feature, we should wrap the code of every function in try catch blocks and the...
stormtrooper
1

votes
0

answer
652

Views

Running an ASP.NET Core Pipeline using Azure Functions

This was posted back in August https://social.msdn.microsoft.com/Forums/expression/en-US/c3e9f882-541f-48a2-a856-956ad3383f67/running-an-aspnet-core-pipeline-using-azure-functions He talks about using a catch-all function and then somehow running the HttpRequestMessage through Asp.Net Core How can I...
Paul Shell
1

votes
1

answer
1.2k

Views

Stream content as Azure function output

I am working with some files and converting from one format to another. My function is a step in a logic app and the output of my function results in a file being created, using the pre-defined step 'Create file (FTP)' where the file content is the body of my function. I am trying to change the way...
brk
1

votes
1

answer
303

Views

Failed to fetch swagger with error message: Failed to fetch. Ensure you have CORS enabled on the endpoint and are calling a valid HTTPS endpoint

I'm trying to run a Function from a Logic App. I made the mistake of experimenting with an API definition on a production Function App. I've redeployed the last working commit and restarted the Function app but I still get this error on the Logic Apps side. How do I get back to where I was?
Chris76786777
1

votes
1

answer
129

Views

Error when running Azure Functions project in Visual Studio with --useHttps

I was trying to figure out a way to run azure functions project with https in Visual Studio using AF v1 with C#. Under Debug section in the project settings, I put 'host start --useHttps' in Application arguments and then tried running the application. In the console it shows 'The host is taking lon...
stormtrooper
1

votes
0

answer
820

Views

How to use Entity framework with Azure Functions

I have my .dll project which contains an Entity Framework database connection. Now I am trying to use reference of this DLL in Azure function, without any success yet. DLL throws an exception while creating my context object. I have install Entity Framework in Azure function This is my package.json-...
SharadG
1

votes
0

answer
61

Views

Azure Storage Webhook being triggered by historical events

I have an Azure Function which uses the webhook bindings to be triggered by each upload or modification of a blob in an Azure Storage container. This seems to work fine on an empty test container, i.e. when uploading the first blob or modifying one of two or three blobs in the test container. Howeve...
awj
1

votes
2

answer
55

Views

Azure Function with NodeJS: retrieve id generated by documentDB after a POST request

I have a quite straightforward issue with a AzureFunction. I want to make a POST request and send back to client to newly created object, with it's id created by documentDB. This is what my code looks like: function.json { 'bindings': [ { 'authLevel': 'function', 'type': 'httpTrigger', 'direction':...
fraeez
1

votes
1

answer
227

Views

Azure Function that allows browser User to Download a network file

We have an Azure function with html UI right inside the function. The Azure function app has VNET access to servers inside our firewall. Possible to build an Azure Function that authenticates into the server/file share and allows a browser user to download a secure network file? If so, Possible wit...
Hell.Bent
1

votes
1

answer
404

Views

Azure Function - SqlConnection connection pool & timeouts

Note - I have read the other topics on S.O about this but not quite the same... .net 461 function, c# I have an app-service-environment with an app service plan dedicated to this single azure function, using 2x P2 workers. The function itself responds to a service bus topic event, at a rate of about...
watdo
1

votes
0

answer
307

Views

Azure Function Authenticating ASP.Net Core Web Api using Microsoft Account

I have an ASP.Net Core 2.0 Web App running in an App Service in Azure that has social login configured (Google & Microsoft) according to the following docs: https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/microsoft-logins?tabs=aspnetcore2x https://docs.microsoft.com/en-us...
Julian.Net
1

votes
1

answer
94

Views

Use Azure CLI to generate function class library

I've noticed I generate a different folder structure and file extensions for C# code depending on whether I use the the Azure CLI (folder with a .csx script library) or Visual studio (no folder with a .cs class library). Debugging from the CLI only exposes the .csx endpoints and visa-versa from Visu...
ericksoen
1

votes
2

answer
276

Views

Azure functions get logon identify

I'm quite new to Azure functions so apologies if this is a stupid question. I'm trying to get the user logon identify, previously I have been able to do this with HttpContext.Current.Request.LogonUserIdentity.Name. Iv'e tried User.Identity in HttpRequestMessage but the name is always empty. Has any...
Conor Dunk
1

votes
1

answer
318

Views

Azure Function App: Function level concurrency settings

Is there any chance to have concurrency host options at individual function level not at Function App level. For example, My one function is ok to take multiple messages from service bus topic but one requires to process one message at a time. Right now I'm facing issue because of concurrency, so I...
Nayan Goswami

View additional questions