Edi Wang

.NET and Azure Developer

All Posts

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

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

Call API with Windows Authentication from Blazor Web Assembly

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! …
.NET Web API Blazor

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

Microsoft MVP Testimonial: Transforming Lives in the Elite Tech Community

The Microsoft Most Valuable Professional (MVP) award is a prestigious recognition bestowed by Microsoft to individuals who have made outstanding contributions in the technical community. I am honored to have received this award continuously for the past six years. In this article, I will share my understanding of the MVP award and its impact on both myself and the community. …
Microsoft MVP

Solving "npm install" ECONNRESET Error on Azure DevOps

A few months ago, my Angular project on Azure DevOps started to have build failure very often. Error message is "npm ERR! network read ECONNRESET", which indicates npm can't connect to internet. This problem does not happen every time, usually re-run failed jobs several times can produce a good build. But still, this is very annoying. So, I took some time to investigate and solve it. …
Azure DevOps NPM