Typically, we use the Azure SDK to upload files to Azure Blob Storage, as it is the easiest method supported by Microsoft. However, there are situations where the Azure SDK might not be available. So, how can we still upload files to Azure Blob Storage in such cases? In this post, I will guide you through the steps to upload files to your Azure Storage Account without using the Azure SDK.
In my ASP.NET Core project, I encountered an issue where files from the tinymce NuGet package were not being copied to the wwwroot\lib directory during the build process, despite referencing both tinymce and Moonglade.MonacoEditor packages. Each package included a .targets file with a Target named CopyScriptsToProject, resulting in a conflict where the latter target overwrote the former, causing only Moonglade.MonacoEditor files to be copied. To resolve this, I renamed the targets in each .targets file to ensure uniqueness.
Azure Function Isolated worker for .NET replaced its default Json Serializer from Newtonsoft.Json with System.Text.Json. This change caused certain behavior differences. In my case, I am not able to deserialize an Enum type from a string value. Let's see how to use JsonStringEnumConverter to fix it! …
Creating Azure Functions using C# and .NET can feel quite familiar to those versed in creating ASP.NET Core Web APIs. Despite the similarities, one key difference lies in the process of JSON serialization, which can present unexpected challenges. In this post, I'll explore the two most common issues developers encounter with JSON in Azure Functions and provide practical solutions to overcome them. …
An application needs to know if itself is running in Azure App Service, so that it can apply special logic and optimization for Azure. When deploying an application to Azure App Service, the platform automatically assigns a set of environment variables that can be accessed by the application code. In this post, we will see how can our application get this information. …
I was rewriting an old Angular application to Blazor Web Assembly a couple of days ago. The App is an internal tool, which uses a backend API that has Windows Authentication. However, when calling API from HttpClient that UseDefaultCredentials, Blazor will throw PlatformNotSupportedException. The majority of internet search so far tell you it's not possible. Really? Let's see how to make it work! …
Azure App Service started to support Linux in 2017 as well as containers. It has similar capability as classic App Service on Windows Server, which can run .NET, Java, NodeJs, PHP and Ruby applications with CI/CD and auto scale. In this post, I will use ASP.NET Core application as an example to explore its underlying mechanism to see how it works. …
My blog system "Moonglade" needs to send email notifications to blog owner when there are events like new comments, new pingbacks, and send email to readers when their comments are replied. I've been building my own infrastructure in the last few years. I will share the journey of how this email infrastructure evolved and the things I learnt. …
Problem
I have a web app with a web front end and API backend both deployed to Azure App Service. I reversed proxy the API using this method I described before, so that my web front end can access API without having CORS issue, and the end users won't need to access my API address directly. However, for the API code, the client IP address I got is always Azure app service's outbound IP instead …
When creating Azure Function with Timer trigger, we usually write CRON expression in our function code. But when you need to dynamically adjust your timer based on business needs, you will have to update your code and redeploy the function. Let's see how we can remove the hard code CRON expression and put it into configuration that we can easily update on the Azure Portal without redeploy the code …