Edi Wang

.NET and Azure Developer

.NET C# Programming Language and .NET Platform

My ASP.NET Core Route Debugger Middleware

Background In the ancient days of the .NET Framework, there was a RouteDebugger that outputs routing information for the current page in an MVC or web API app, or sees all the routing information registered in the app. The latest version of its NuGet package is 2.1.5, updated in 2016, from an article by Phil Haack 12 years ago https://haacked.com/archive/2008/03/13/url-routing-debugger.aspx …
.NET Middleware

Docker Support for My .NET Core Blog System on Azure

"Moonglade", the open-source blog system used by my blog (https://edi.wang), has been around for over a year. At least four community friends have used the system to deploy their own blogs on Azure and Alibaba Cloud. Unfortunately, the system has long lacked Docker support, which is the political correctness of today's world. Recently things have changed, and I successfully made my blog system run …
Azure Linux Docker

How to Check If .NET Core Program is Running under Remote Desktop

There are a few reasons that we need to know if our program is running under the Windows Remote Desktop (RDP) session. For example, if it is running under RDP, we may disable animation and other fancy graphics effects. But how can we detect if our program is currently under RDP? Let's see. Windows Forms If you are developing Windows Forms Apps using .NET Core 3.x, there's a built-in API that can …
.NET Windows Remote Desktop

Performance Optimization for My .NET Core Blog on Azure

I rewrote my blog system with .NET Core last year. After more than a year of optimization, the server response time is now 8ms comparing to 80ms when it first went live. This article shares what I have done to make my blog works really fast. In fact, before .NET Core, my old blog system was written by .NET Framework, built from ASP.NET Web Form 2.0 in 2008 all the way up to ASP.NET MVC5 in 2018. …
.NET Azure CDN

Upgrade WinForms Apps from .NET Core 3.0 to 3.1

I upgraded a WinForms App to .NET Core 3.1 these days. It's an open-source on-screen ruler created by Jeff Key in 2004, the original code was for .NET Framework 2.0, I've already upgraded it to .NET Core 3.0 in September this year, it was very smooth without any code change. But this time, .NET Core 3.1 does require some code changes.  The project is on my GitHub: https://github.com/EdiWang/ …
.NET WinForm

Try the New Azure .NET SDK

Recently, Microsoft unveiled a new Azure .NET SDK, it's not a simple version upgrade, but a major change in the programming experience. While it may take a while to adapt to the new SDK, it is worth learning. The new SDK is more powerful, more flexible and easier to use. Current Status of Azure .NET SDKs Currently, the official packages for .NET SDKs for Azure are confusing and unfriendly to new …
.NET Azure SDK

Generate a True ICO Format Image in .NET Core

A while ago I finally completed the dynamic generation of favicons for my blog system. As we all know, favicon must have an icon in .ico format, and the rest can be output as png files and a manifest.json. However, this ICO format let me struggle for a while. I'd like to share my solution. The Problem with Built-in API As many of you may know, System.Drawing.Image has a Save method that allows …
.NET Icon

.NET成人礼 | 还记得20年前一起拖过的控件吗?

每一代人都有记忆里的味道。煤球炉、黑白电视机是属于父母的记忆。而“拖控件”式编程,启蒙了无数像我这样的80后(嗯,89也算80后)。 经典旧世 2000 年那个时候,上海这样的城市里也不是每家每户都有电脑,我家也没有电脑。我在学校经常听几位家里条件不错的同学说他们玩电脑的事情。CIH、千年虫等名词让我对电脑有着非常强烈的好奇心。而我第一次体验到计算机,是在我母亲单位的机房里。它是一台卧式机箱、15寸 CRT 凸面屏显示器的 Windows 95 电脑。 当时的微软对我来说就是神的存在。因为我认识电脑到使用电脑的一切几乎都离不开这家伟大的公司,它就像上帝一样开天辟地,创造了PC上的万物。Windows、Office、IE 这些当年几乎是唯一的主流产品。而微软的创始人之一比尔·盖茨也成了我的偶像。还记得当年,上海有个PC专题的电视频道,有一天该频道播放了比尔盖茨关于.NET战略的演讲,啥也不懂 …
.NET

Azure Remote Controlled Light with .NET Core 3.0 on Raspberry Pi

3 years ago, I wrote a blog post "Azure Remote Controlled Light with Windows 10 IoT Core", which is an experiment to sending a signal from your home and it will travel around the world then come back to your home to turn on an LED light on your Raspberry Pi. 3 years later, Windows 10 IoT Core and UWP seem not living so well. Microsoft doesn't have a new build of Windows 10 to support the latest …
.NET Azure Raspberry Pi Linux