When upgrading a legacy .NET Framework application to .NET 6, a custom encryption method that uses Encoding.Default.GetChars() method, which output wrong result. Let's see why and how can we fix it. …
When we are dealing with URL encode in .NET Core 2.1, there are two APIs: System.Net.WebUtility.UrlEncode and System.Web.HttpUtility.UrlEncode. What's the difference between them? And which one should we prefer to use? I have done some research today, here's my findings. 1. Test Results First, let's see some tests. I've tested 2 couples of the same method between WebUtility class and HttpUtility …