Edi Wang

.NET and Azure Developer


Identify Users from Different Countries and Regions for Websites on Azure

For websites that need to display different content for users in different countries and regions, we usually identify the user's location based on the IP address. It means we have to write our own code, purchasing and maintaining an IP database, or using a third-party IP data service, it will take huge efforts. How to quickly do it without purchasing an IP database and write a lot of code? …
Azure Front Door

Hosting Static HTML Website with Azure Static Web Apps

When I choose free static website hosting plans, I would use GitHub pages in the past. But now, since the GA of Azure Static Web Apps (SWA), I now have another free of charge option. I've tried to host a few pure HTML/JS website as well as .NET Blazor WASM applications with Azure Static Web Apps. In this post, I'll share how to create a static website by SWA. …

How to Prevent Access to App Service Url Behind Azure Front Door

In my previous posts, I have introduced usage of Azure Front Door. However, when we finish setting up the front door and bind our domain to the front door, users can still access the App Service URL. In this post, I'll introduce how to prevent access to our App Service when using Azure Front Door. Problem For example, my blog is binding https://edi.wang to my front door, I have 2 App Services …
Azure App Service Front Door

Setup Cat Live Streaming on Microsoft Azure

Cats are very helpful for programming. But when we are not at home, how can we remotely watch the cat and let our friends watch it together? With Azure, this problem will be solved! Live broadcast equipment and software USB Camera In terms of hardware, we only need an ordinary USB camera. It is recommended to use a camera with auto focus and resolution above 1080p. The image sensor of the camera …
Azure Azure Media Service

How to Enable Application Request Routing on Azure App Service

We typically use Application Request Routing (ARR) module to host a reverse proxy on IIS. Azure App Service is also using IIS as it's gateway, which should work for reverse proxy, but it won't work by default. Let's see how can we enable ARR on Azure App Service. The Experiment I have https://dropdatabase.run/ domain, and I want to reverse proxy https://996.icu/ under https://dropdatabase.run/996. …
IIS Azure App Service

Load Balancing My Blog on Azure

In order to improve the page loading speed of my blog for US users, I deployed an App Service in West US region on Azure some time ago. Now I have 2 servers running my blog, East Asia and West US. In this post, I'm going to illustrate how to use Azure to load balancing these servers, so that users can get access to the closest server for their regions. Adding Identifier Tags Since the codes …
Azure App Service Front Door

How to Quickly Fix Dashboard After Moving Resources in Azure

Azure users frequently need to transfer resources to a different resource group or subscription due to budget constraints. Once the transfer is complete, the associated Dashboard components typically become invalid. This usually necessitates manually deleting and rebuilding each dashboard card individually. Is there a quick and accurate method to repair the Dashboard in a single step?

Securing My Blog with Azure Web Application Firewall (WAF)

Website developers and operation will inevitably encounter hackers. There are many fully automated hacking tools and scripts on the Internet that can scan your website for known security vulnerabilities and launch fully automated attacks in an attempt to seize control of the server. As a result, businesses often purchase web site application firewalls (WAFs) and deploy in front of the web server …
Azure WAF

Test Network Speed Between Azure VMs Using iPerf

When it comes to measuring network speed, you might think of testing the Internet connection speed with the famous speedtest. But in fact, just testing the Internet connection speed is not reliable. In some scenarios, the final Internet speed is also affected by the your infrastructure like the connection to your ISP's server. Therefore, it is very important to know where your network performance …
Azure Network

How to Restore Connection After Accidentally Disabled NIC on Azure VM

Normally, we uses cloud based VMs through SSH or RDP, so a network connection is necessary for connecting to the VM. But what if you accidentally disabled the NIC on your cloud VM? You may want to call Azure Support or find a previous snapshot for restoring VM. That's not necessary! Azure can help you restore your NIC by yourself in a few steps. Experiment I created a Windows Server 2019 VM on …
Azure VM