Introduction
This article series is aimed at teaching you how to use Cosmos DB trigger and HttpTrigger in an Azure function to create a serverless app that can broadcast the data to clients using SignalR. The client can be a desktop/web/mobile client. For this article, I will be using a simple desktop client created using WPF with Material Design. To follow along please make sure you have an Azure account. If you don't have it already you can create one for free by visiting Cloud Computing Services | Microsoft Azure.
This article is part 3 of the series and is aimed at teaching the readers how to publish a new Azure function (using VS 2019) to Azure Cloud. To follow along please make sure to refer to Part 1 and Part 2 of this article series to learn how to create Cosmos DB and Azure functions that we will be publishing as a part of this tutorial.
Step 1 - Publish the Azure Function on Azure Cloud
Open Visual Studio and open your Azure Functions project. Right-click on the project name on Solution Explorer and click Publish

In the Publish window that opens choose target as Azure and click the Next button

In the Specific Target, window choose Azure Function App (Windows) and click Next

In the Functions Instance window make sure your Subscription name is populated and click the small green plus (+) button

Clicking the plus button will open a new popup to create new functions app. Give a proper meaningful name (you can leave it to default name if you want to), make sure your subscription name is correct and choose your resource group as the same resource group in which your Azure Cosmos DB is hosted (please refer to Part 1 of this article to get the name of your resource group if you don't remember it). Choose a location near you or you can leave it to the default location. Click the Create button once you are satisfied with all the settings.

Once the function app is created choose it in the Function Apps window and click the Finish button

In the window that opens next click on Publish button to publish your app on Cloud

If the publish is successful you should be able to see a success message on the screen

Scroll down in the publish window and click on the Site link of your function to make sure its running fine













Uday DodiyaPosted Aug 28, 2022, 4:17 AM
Good One Keep It Up
Tanuj GyanPosted Dec 1, 2021, 3:18 PM
Links for other articles in the series Part 1 -https://www.c-sharpcorner.com/article/live-charts-using-azure-cosmos-db-azure-functions-signalr-and-wpf-part-i/ Part 2 - https://www.c-sharpcorner.com/article/live-charts-using-azure-cosmos-db-azure-functions-signalr-and-wpf-part-two/ Part 4 - https://www.c-sharpcorner.com/article/live-charts-using-azure-cosmos-db-azure-functions-signalr-and-wpf-part-four/ Part 5 - https://www.c-sharpcorner.com/article/live-charts-using-azure-cosmos-db-azure-functions-signalr-and-wpf-part-five/