🎄 Merry Christmas! 🎅

Edi Wang

Microsoft MVP for Azure

Posts in 2024

Secure Your Azure OpenAI API for Azure App Service with VNet Integration

When deploying Azure OpenAI resources, prioritizing security is essential. One critical step is to restrict access to your API endpoint, ensuring only your applications can connect. By implementing such measures, even if your API key is leaked, unauthorized users will be unable to exploit it—protecting you from unexpected charges. Follow the steps outlined in this blog post to implement network restrictions and safeguard your resources.
Azure Network AI App Service

Migrating Moonglade.Email to Azure Communication Service

Moonglade.Email, is an Azure Function that originally relied on SMTP for sending emails. Microsoft implemented a change that prevents connections to both personal and enterprise Office 365 Outlook mailboxes. To ensure the email service continues functioning, I decided to integrate Azure Communication Services. In this blog post, I will explain how I implemented support for Azure Communication Services in the Moonglade.Email Azure Function.
.NET Azure Email Azure Function

How to Get Azure App Service Windows Worker OS Full Name and Version

Sometimes, it's crucial to know the underlying operating system running your Azure App Service. This can help you address compatibility issues during development before deploying to Azure. Unfortunately, Microsoft's documentation does not specify the exact operating system name and version of the Web Worker that runs your application. So, it's up to us to determine this information.
Azure PowerShell App Service

Scripts for Recursively Download All Files from a Public Azure Storage Container

In my previous blog post, "How to List All Files in a Public Azure Storage Container", I demonstrated how to use the Azure REST API to retrieve a comprehensive list of all file information in a public Azure Storage container without requiring any keys or authentication. Leveraging this method, you can easily create scripts to download all files from a public Azure Storage container without the need to install any additional tools. In this post, I will share PowerShell and Python scripts to do that.
Azure PowerShell Python Azure Blob Storage

Upload Files to Azure Blob Storage without Azure SDK

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.
Azure Azure Blob Storage

Solving NuGet Package Target Naming Conflict

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.
.NET NuGet

How to List All Files in a Public Azure Storage Container

I discovered a website that serves its files from an Azure Storage blob container. I'm curious about the contents of this directory. However, Azure Storage Accounts, when used as web servers, do not support "directory browsing." Is it still possible to list all the files in the directory? Let's see. To list all the files in a public Azure Storage Blob container, we can use send HTTP requests to the Azure Storage REST API, or use Azure CLI and Azure SDK. Let's begin with the most easy way.
Azure Azure Blob Storage

Deploy big-AGI to Azure App Service with Individual Account Login in 3 minutes

big-AGI, the AI suite for professionals that need function, form, simplicity, and speed. Powered by the latest models from 12 vendors and open-source servers, big-AGI offers best-in-class Chats, Beams, and Calls with AI personas, visualizations, coding, drawing, side-by-side chatting, and more. However, the official repository of big-AGI does not offer a one-click installation for Azure, and the built-in authentication is only basic username and password. In this post, I'll share how to deploy big-AGI to Azure without the need to create a VM, and setup access control that requires individual accounts in Entra ID to log in, without making any changes to the code.
Azure AI App Service

How to Set Time Zone for Azure App Service

Azure App Service defaults to UTC time, causing issues for legacy applications designed for specific time zones, such as Japan. These apps often use `DateTime.Now`, resulting in incorrect data when deployed on Azure. While the server time zone can't be changed directly in Azure App Service, this article will guide you on how to adjust the time zone to ensure your legacy applications run correctly.
Azure App Service

How to Prevent Untrusted Apps from Reading Your Browser Password on Windows

Although Microsoft Edge, Chrome, and Firefox store encrypted passwords in the user profile location, these can be easily decrypted by another program without requiring user authentication or approval. Consequently, an untrusted program, not flagged by Microsoft Defender or other security software, can easily access your passwords. Let's check out the simplest method to prevent this.
Windows Security

Beginners Guide to Run ChatGPT-Like AI Locally on Windows PC with Interactive UI

I own a Windows 11 PC equipped with an RTX 4070 GPU and would like to use its power for local AI applications. There's a clear need for a simpler way to leverage AI technology for beginners and non-tech users. In this guide, I'll walk you through the essential steps to get your AI model up and running on a Windows machine with a interactive UI in just 30 minutes—no advanced expertise required.
AI

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

PowerShell to Enable SQL Server Express Remote Access

SQL Server Express is a free edition of Microsoft's SQL Server, which is a relational database management system (RDBMS). However, remote access is not enabled by default on this SKU. To access a SQL Server Express instance from the network, we have to do a few steps. There's plenty of guide on the internet telling you how to enable remote access via GUI, but I would like to do it from PowerShell. …
SQL Server PowerShell

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