azure-functions

Is it possible to read File from same folder where Azure function exists

六月ゝ 毕业季﹏ 提交于 2021-02-06 01:35:52
问题 In my Azure C# function I need to read a .txt file. I make the .txt file in Visual studio and set it to "copy Always". Now I am using this code to read the file var dir = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetEntryAssembly().Location); var path = System.IO.Path.Combine(dir, "twinkle.txt"); this code doesn't work. When I open the folder which is the value of dir. It lead me to this directory ""C:\Users{username}\AppData\Local\Azure.Functions.Cli\1.0.9"" How I can store

Azure Function Service Bus trigger fires more times than messages in the queue

末鹿安然 提交于 2021-02-05 09:42:58
问题 I have two Service Bus Queues and Azure Service Bus Queue Trigger. The function reads 1000 messages from the queue and forwards them to another (for test) When publishing to Azure (plan consumption) I get 1030+ function hits even though I only have 1000 messages in the queue. I think this has to do with the number of function instances. Q: How to process 1 unique message only once for 1 function instance? Queue message count image [FunctionName("Function1")] public static async Task Run(

How to get users from azure active directory to azure function

大憨熊 提交于 2021-02-05 09:32:08
问题 I am developing a server less application using azure functions using Node js. Function app auth via azure active directory. My scenario is I want to get particular user data ex(email,username etc) by using his email or username during execution of one of http trigger function. There are several options that I already checked (ad and activedirectory libraries. These library seems not updated and I want to know is there any way to do this by using azure's Node Js SDK? I am seeking a solution

Error calling the azure function endpoint from azure data factory

眉间皱痕 提交于 2021-02-05 09:30:07
问题 I have linked azure function in data factory pipeline which writes the text file to blob storage The azure function works fine when executed independently and writes the file to blob storage But i am facing below mentioned error when i run the azure function from data factory { "errorCode": "3600", "message": "Error calling the endpoint.", "failureType": "UserError", "target": "Azure Function1" } I have configured the azure fucntion to access the blob with blobendpoint and shared access

Best approach to call web api from azure function [closed]

我们两清 提交于 2021-02-04 19:20:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago . Improve this question Actual situation: I have a 2 blob triggered azure functions that are working perfectly (one is v2 and the other v1 ) I have, in the other hand, a REST WEB API application (that exposes methods to encrypt and decrypt a stream) published in my azure Devops

how to download code of azure functions app

最后都变了- 提交于 2021-01-29 19:31:47
问题 I searched a lot about the way to change read only mode. currently I am getting Your app is currently in read only mode because you are running from a package file. To make any changes update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting. I added value in configuration like described here at this path: Platform features -> Configuration -> Add/Edit application setting but nothing. I understood it is not possible so I want to download azure functions app code and edit

Usage of Azure App Configuration's Feature Flags in Azure Functions

走远了吗. 提交于 2021-01-29 19:12:40
问题 I'm working on exploring the following 2 features of Azure App Configuration in Azure Function's Http Trigger Externalizing the App Settings Feature Flags Below is how i'm getting the reference of the configuration So, when I use _configuration["SomeAppSettingKey"], I'm able to retrieve the value. So, I'm able to achieve #1 feature mentioned above. My Question is, How do we retrieve the Feature Flag information? I have tried the below ways. I would appreciate if someone could help me in

OleDB or ODBC from Azure Func or Logic App

守給你的承諾、 提交于 2021-01-29 17:47:48
问题 I have a legacy application which uses Access database (.mdb file). Basically it reads an existing mdb file and fill with new data, which is consumed by downstream systems. We cannot get rid of mdb file and the functionality is very important as it is consumed by various clients. We need to migrate that application to Azure and we are proposing several Azure Func and Logic App. We are looking at possible option to achieve this feature. As a poc when I try accessing mdb file from AF running on

Issue with Entity Framework 6 while connecting to SQL Server from Azure function V2

血红的双手。 提交于 2021-01-29 14:33:21
问题 I am trying to use an existing library which is a .net library which uses EF 6.0 to connect to a database. Since Azure Functions does not have an app.config file, I am trying to set the connection string using C# code. But I am getting the following exception while connecting to the DB using my DB context: System.ArgumentException: The ADO.NET provider with invariant name 'System.Data.SqlClient' is either not registered in the machine or application config file, or could not be loaded. See

Service Model Assembly Error With Azure Functions V2+ (.net Core 2.1)

不想你离开。 提交于 2021-01-29 12:49:00
问题 I have been using azure function V2(.net core 2.1) in my azure function app. I have been using System.ServiceModel.Primitives nuget for my function App which uses ServiceBusEnvironment packages in it. I am able to compile the code and run the function. While calling the function I get this runtime error. Could not load type 'System.ServiceModel.Channels.IBindingRuntimePreferences' from assembly 'System.ServiceModel, Version=4.0.0.0' I googled up many things. But no luck. I then tried by