I want to learn more about cloud, cloud services, cloud computing, etc. That is why I write up this one. I want to explore more Azure Functions. This is not a tutorial, I just want to take note some problems and what went well when I was exploring the Azure Functions. You want to learn more about Azure Cosmos DB, you can check here
This problem took me many days to find the solution. Until now, I still can't figure out why. So, I take workaround. My workaround are read the header
X-MS-CLIENT-PRINCIPAL-NAME and activate the
Easy Auth. This is a disadvantage, I can't know if my solution works. I need to deploy to the Azure Functions and call it with my client code. I want to minimize test directly to "production" when heavy development time, but I don't have many choice now.
As a newcomer at CosmosDB, I think the error little bit hard to understand. When I am not setting up the Container, they only said 404. It is hard for me to know the error context.
- Database Name: You will set up this at
UseCosmos. This is same with
- Collection: When use define
DbContextwill become Collection. So you need to create it or setup it before.
I don't understand for this. Is it really because high demand? I want to provision Azure Cosmos DB at Southeast Asia, but it is always said high demand. So I take workaround to use Azure Cosmos DB free and use different region. It is have different region and quite far from my place. It has huge delay in my application because of this. Anyway, do you want to try Azure Cosmos DB? You can check here.
I have some videos when I was exploring the Azure Functions and Azure Cosmos DB. Here we are,
- Deploy Azure Functions using Visual Studio 2022
- Create Azure Cosmos Db Free
- Setup Azure Cosmos Db
Easy AuthAzure Functions
Azure Function Example in .NET
- azure-functions: Root directory for Azure Functions of Backend that will be hosted at Azure Functions. Using .NET 6.
- azure-function-client: Root directory for client to consume Azure Functions and will be hosted at Azure Static Web App Service. Using React.js.
- ToDo.Web: Root directory that consume the Backend from Azure Functions, run as Web App and will be hosted at Azure Web App Service. Using .NET 6.
Please see at CONTRIBUTING.md
Bervianto Leo Pratama
For the next part, I will tell more about the Azure Static Web Apps and deploy the client into there. We will consume the azure functions and use
msal as our authentication client.