Moment For Technology

How to use IHttpClientFactory in ASP.NET Core

With IHttpClientFactory, you can create HttpClient instances seamlessly without having to manually manage their lifecycles. When developing applications using ASP.NetCore, you may often need to invoke WebAP through HttpClient

C# reads the Config file

Read information from configuration files (including using node appSettings and custom nodes) Configuration files read data in appSettings read data from the defining node create read data from the class config file that defines config Add node read from the defining config

Winform rounded corners and stroke perfect solution

The rounded corners of the WinForm form are not easy to set or draw. I searched the Internet for many solutions and finally found a perfect solution. Redraw the corners of the window is commonly used in online information. But in a different way and finally

Write a Web server in C#, part 2 - middleware

In the last article, we created a Web server with basic static file service functionality, but without dynamic functionality. We hope to further expand this program into a fully functional dynamic Web server. But before you get too busy writing code, let's think about what a Web framework should look like at an architectural level. Although different programming languages are real...

Boundless memory, how can I use WinDBG to find you?

The day before yesterday, a friend of wX threw me a dump, asking me to help verify whether some sensitive information is encrypted in the memory. Nowadays, data security is very important. Not only the information in the database should be encrypted, but the data after pouring into the memory should also be stored in ciphertext and decrypted at any time.

Unity game framework building (5) simple message mechanism

23333333. Let me laugh for a second. In three words, solve!!!! Decoupling!!!!!!!!!! Us!!!!!!!!!! . What takes a few lines of code is not so easy to implement. You can see that the receiver implements the interface IMsgReceiver and the sender implements the interface IMsgSender. So let's look at these two interface definitions. Nothing. There is no SendLogic...

C# calls the Activex controls developed by Qt

Stay tuned for... Develop Activex controls for other applications to call, this chapter explains C# calls Activex controls, not limited to Qt developed Activex controls. To make Wpf calls to Activex controls, it is necessary to wrap the Activex controls in C# and provide them to Wpf calls. Register before running, use Qt's built-in...

Write your own Web server in C#, part 4 - Session

In the last article, we implemented the routing capabilities of the Web server and implemented basic support for the controller. We should have happily continued to add functionality to it, but soon discovered an embarrassing problem ———— we don't have a Session yet. More specifically, the HttpListenerContext we've been using only provides Req...

Where are static variables marked by C# ThreadStatic stored?

As I mentioned earlier, this is a process-level cache that can be seen by multiple threads, so in a multi-threaded environment, you need to pay special attention to synchronization. Either use lock or ConcurrentDictionary, I think this is also a mindset, a lot of times the mind is trying to fix the existing base...

About (Moment For Technology) is a global community with thousands techies from across the global hang out!Passionate technologists, be it gadget freaks, tech enthusiasts, coders, technopreneurs, or CIOs, you would find them all here.