Getting Logic Apps to recognize Functions from precompiled assemblies? - azure

I have an Azure Function App in C# that I precompile and deploy to Azure using VSTS. I am successfully deploying and can test my 2 HTTP triggers from postman and the command line.
I am now trying to use these Functions in a Logic App. When I go to create a Function action, I select my Function App but it does not recognize my 2 Functions.
Selecting the onsite-functions app should show my 2 Functions.
But instead, it prompts me to create a Function.
I have created an OpenAPI spec for this Function App, but this does not help. Does anyone have any ideas on how to get my Functions showing up in the Logic App designer?
Update
Switching from a Kudu deployment to an Azure App Service Deploy step seems to fix the issue.

Related

Build fails while deploying from GitHub to azure app service (node JS Twilio backend)

I am trying to deploy my backend code to azure app services using the GITHUB actions, the code has been committed and in the action, yml file is also generated, and after clicking the build it fails with an error. Error: Process completed with exit code 1.
It depends which Action you used.
It is recommended to start with "Deploying Node.js to Azure App Service" and its prerequisites (creating an Azure App Service plan, creating a web app, configuring an Azure publish profile and create an AZURE_WEBAPP_PUBLISH_PROFILE secret.)
You can then create your workflow, following the example "deployments/azure-webapps-node.yml" as a possible template, for you to adapt.

How to deploy a C# Console app to Azure App Service using Github Actions

I am trying to deploy a C# Console app. (which inserts data from a third party API to Azure SQL) using Github Actions (push to Azure App Service), and I need some guidance for an option.
I pushed my C# code into Github from my Visual Studio solution in my laptop.
I chose this option ("Deploy .Net Core app to an Azure Web App") at Github Actions:
This is result that I got:
Did I choose wrong option here?
Do I need to create a Web App?
We can deploy the console application into Azure app service using an Azure WebJob. To get complete idea on WebJob. But the performance of the application is not guaranteed. To deploy using Visual Studio. To deploy the application when the WebJob is already created use the link.
To schedule a WebJob
To schedule the WebJob refer the link.

Azure Function App Deploy from Azure Build Pipeline: 'credentials' cannot be null

I am trying to create a build pipeline in Azure DevOps to deploy an Azure Function Application automatically as part of a continous integration pipeline. When the Function App Deploy step is run, the step fails with 'credentials' cannot be null.
Does anyone know why this happens?
My Build Pipeline:
The Log output when the step runs:
The only thing that I think that it can be is the Azure Resource Manager subscription which I am using Publish Profile Based Authentication however I have managed to create a similar pipeline for a web application with a deploy option using this authentication and it worked successfully. I just cannot deploy the function application.
This same problem also ocurrs with publishing web apps I found. There are two different tasks that can be used for web apps to publish and you have to use the right one.
There is a task called Azure Web App Deploy that works.
Also a task called Azure App Service Deploy that doesn't.
This is with Publish Profile Based Authentication.
I found that to deploy the Function Application you can also use the Azure Web App Deploy task and it seems to work.
Just for a bit of context on this one.
The Azure Functions task will allow you to select - and even create - a Publish Profile based service connection. No warning is given, but - looking at the code - the task doesn't implement the needed fetching of the push profile.
At least the task - when selecting the service - should warn you that it doesn't handle Publish Profile authentication. At best they should implement it.
For the nerds in here, even more detail.
For tasks that work with Publish Profile authentication - like for example the Web App Deployment - you have something like this happening:
if (Service Endpoint is Publish Profile) {
publishProfileUtility.getSCMCredentialsFromPublishProfile();
}
Look at the link for the actual code.
On the other hand the Azure Functions will simply create the service with the passed endpoint and hope for the best.

Function Inside a Webjob Not Showing In Dashboard

I may very well be not understanding how this works, but I thought I was doing pretty good up until now.
I have a Azure Storage Account setup for my WebJob Dashboards.
In the application settings of my WebApp I am setting a Connection String AzureWebJobDashboard of type Custom and it has the connection string to that storage account.
In my Webjob I have the following code:
[FunctionName("ProcessIncomingCustomerQueue")]
public static void ProcessIncomingCustomerQueue([QueueTrigger("incoming-customer")] string message, ILogger logger)
{
When I start the webjob, is acts like it is finding everything correctly.
No error message about needing to configure the AzureWebJobDashboard.
When it starts it finds the function per the log:
But when I click on Functions on the top right it says "No functions are present".
Is that not what that is for, to show the functions that are in the webjobs?
Thank you --
Joe
Azure Functions and Azure Web Jobs are 2 different (but related) technologies.
Web Jobs run as part of your Web App. Azure Functions are running separate from your Web App.
If you want to have an Azure Function, create a Function App Resource in the Azure portal and use either the Web Portal to write your code or create a Azure Function Project in Visual Studio and deploy it to that resource.
You can also use Visual Studio Code and the Function CLI to create Azure Functions.
Find details and quick starts here:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function-azure-cli

Azure Functions - Visual Studio Tools

I was trying to create Azure Functions as provided in the help link - https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/
I am actually creating a Evenhub trigger to write the messages to blob storage.
When I try to run the project, I am getting an error:
"Microsoft.Azure.WebJobs.Host: Error indexing method
'Functions.DashPOCEventHub'. Microsoft.WindowsAzure.Storage: Value
cannot be null."
I have put the correct values in the appsettings.json.
Can somebody help me with this error?
Also, when I try to publish the function to Azure, the appsettings.json is not being set correctly. I cannot see the values and keys when I go into the Azure UI application settings page.
appsettings.json won't create/override your web app ApplicationSettings when you deploy. You'll need to specify the ApplicationSettings for the web app explicitly.
The reason for this is so that you can use different secrets locally (appsettings.json) from what you deploy (web app appsettings).
There is more info on appsettings.json and web app Application Settings here.
Silly John, did you update the Azure CLI when you run your Function Locally? Today is on the Azure Functions Console CLI 1.0.0-beta.97.
Probably, this update solves this issue.

Resources