This aims to be a better solution to a perceived problem of having my dns cache poisoned
In the commit kubernetes: move all resources to the default namespace of my Seelan's Tyres project, I said this:
".. after watching john savill's video "how dns works", i suspected my dns was poisoned so i started flushing it often, then it got to a point where it seemed like it was being poisoned on a regular basis as my builds would hang, and when i flushed my dns, it would proceed
to solve this problem, i created a script to flush the dns, and created a task in task scheduler to execute that script every minute indefinitely"
Though that solution works, it causes other problems like:
- Flashing the terminal and losing focus
- Causes the terminal [sometimes] to freeze and it builds up on each other
This obviously ruins my experience so I had to come up with another solution and this is it
It's a worker service that can be registered as a Windows Service that runs in the background executing ipconfig /flushdns
every 30 seconds
This doesn't flash the terminal, and logs are sent to the Windows Event Logs
A much MUCH better solution
- Building ASP.NET Core 3 Hosted Services and .NET Core 3 Worker Services
- Author: Steve Gordan
- How DNS Works
- Author: John Savill's Technical Training
- Execute an Exe in Azure
- Author: Microsoft Developer
- run command prompt commands from within a C# application
- Author: Coders Media
- Visual Studio 2022 17.8.0 or later
- .NET SDK 8.0.100
- CMake 3.21.4 or later
Run scripts/build.cmd
and the resulting executable will be in the publish folder at the root of the repository
All relevant scripts will be in the publish folder too, to register the service, and to delete it
Upon registering it, you have to go into Services [Press 🪟 and Search "Services"], and start it manually