1
votes

I'm testing Azure Functions for the first time using VS 2019 and this guide: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio

When I run the function locally, everything works fine. Then the guide tells me to use VS to publish the app to my Azure account, which I do successfully, and I see a newly created function app in the Azure website:

enter image description here

But if I try to call the function using

https://functionapp220200104024331.azurewebsites.net/api/Function1

as I'm supposed to, I get a 404 error.

If I look at "Functions" at the Azure portal, I see none:

enter image description here

and I think I should see "Function1" there, but it is not listed.

Am I missing something?

2
did it get publish successfuly?Sajeetharan
Function deploy failed. You still can see the plus sign.1_1
Hi, rettiseert. Is your problem solved?1_1

2 Answers

4
votes

It looks like the functions got created successfully, bit did not get published.

The publish flow in Visual Studio first enables you to create a Function App to publish to, but it's only the last 'Publish' step that actually deploys something to Azure. Are you sure you clicked the button labelled 'Publish'?

You can open the 'Web Publish Activity' or 'Microsoft Azure Activity Log' Window under View > Other Windows which should give you some more information on if the publish happened.

You can go to https://functionapp220200104024331.scm.azurewebsites.net (it runs Kudu) to get some more insight into what is and what isn't available.

-1
votes

First, as rickvdbosch says, maybe you don't click the publish button. The Visual Studio create the app service on Azure and wait for you to publish.

Second, Given that the function is not shown under your functionapp, I think this may be a deployment failure. That means you publish to azure but the function is not publish successful. If your function app is created by local. It will publish dll file and the function app will be 'readonly'.

This is your functionapp, you can see there is a plus sign here:

enter image description here

But if you deploy successfully, your function app will be like this:

enter image description here

(Without a plus sign and cannot be edited.)

So I think there is no function under your function app.

You can take the following steps to test my judgment:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

If you deploy successful, you will find your function here, a .dll file. But as your description, I think you deploy failed.