Edi Wang

.NET and Azure Developer

Azure

How to Run Windows XP and Windows 2000 VM on Azure in 2024

Microsoft Azure does not officially provide Windows XP images for the creation of virtual machines. The earliest version of a client OS image available on Azure is Windows 7. Despite this, I have devised a method to operate legacy Windows operating systems, including Windows XP, on the current Azure compute platform. In this blog post, I will outline the steps involved in this process in detail. …
Azure VM

Deploy Website from Local Machine to Azure App Service without Git, CI/CD or VS/Code

Azure App Service offers a variety of deployment options tailored to the diverse needs of developers. But what if your project is a straightforward task that doesn't warrant the complexity of setting up an entire suite of tools or a continuous integration/continuous deployment (CI/CD) pipeline? I'm going to walk you through a streamlined approach that minimizes effort to make your deployment ready …
Azure App Service

Json Serialization Caveat in Azure Function

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. …
.NET Json Azure

Redirect Traffic to New CDN Endpoint in Azure CDN

I am in the process of transitioning from a Classic Microsoft CDN to a new CDN hosted under a different domain name. To ensure a seamless user experience during this migration, I intend to implement a redirection mechanism. This will automatically reroute users to the new CDN endpoint whenever they attempt to access resources from the old CDN. Let's see how to do it from Azure portal. …
Azure CDN

How to Add a Public IPv6 Address to Azure VM

When configuring a new Azure Virtual Machine (VM), you'll notice that it isn't allocated a public IPv6 address automatically. By default, only an IPv4 address is assigned. In this guide, we'll walk you through the process of manually adding a public IPv6 address to your Azure VM, ensuring your setup is future-proof and ready to handle the latest internet protocol requirements. …
Azure Network

How to Check If Code Is Running on Azure VM

An application needs to know if itself is running in Azure VM, so that it can apply special logic and optimization for Azure. You can check if your code is running on an Azure VM by querying the Azure Instance Metadata Service. This service provides information about running virtual machine instances that can be accessed from within the VM. …
Azure VM

How to Detect If Your Application is Running in Azure App Service

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. …
.NET Azure App Service

No Need for a VM, Build Docker Image with Azure Container Registry

Sometimes, there are instances where we need to create a Docker image but do not have access to a Docker environment or prefer not to set up a virtual machine solely for installing Docker. Of course, we can do this with GitHub Actions, but there is an alternative option that I would like to share in this post: utilizing Azure Container Registry to build your Docker image. …
Azure Docker Container

Deploy ChatGPT Next Web to Azure Container Apps with Individual Account Login in 3 minutes

A couple of months ago, I wrote a blog post of "Deploy ChatGPT Next Web to Azure App Service with Individual Account Login in 3 minutes". In this blog post, I will share a new approach to deploy ChatGPT Next Web besides App Service, which is to use Azure Container Apps. My objective is to complete these tasks within three minutes. Let's explore how this can be achieved. …
Azure AI Docker Container