Reusable C# Windows Service Refactor

Job ID: 39836400

Budget: $15 – $25 AUD

I have an existing .NET-based Windows service that moves data continuously between two systems. The core logic works, but the code base has become tangled and hard to maintain. I need it restructured into a clean, well-layered solution that I can drop into future projects with minimal effort.

Key goals
• Split transport logic, configuration, and utility classes into clear, testable components.
• Wrap the whole thing in a Windows service that starts automatically, stays alive, and exposes graceful start/stop hooks.
• Implement robust error handling so the service can detect and recover from common runtime problems—connection hiccups, malformed records, timeouts, or anything else that could interrupt the transfer loop—without crashing.
• Pipe all operational messages (info, warnings, exceptions) to Windows Event Viewer using Microsoft.Extensions.Logging so I can monitor it centrally.
• Keep configuration (connection strings, polling intervals, batch sizes, etc.) in an external JSON or XML file to avoid recompilation when settings change.

Deliverables
1. Visual Studio solution (C#) containing the refactored, reusable service project.
2. Clear installation script or PowerShell commands to register/unregister the service.
3. Sample config file with inline comments.
4. Short README explaining architecture, extension points, and how to add new data sources or destinations.
5. Brief test log that shows the service starting, transferring a sample payload, handling a simulated error, and logging the event successfully.

Acceptance criteria
• Service installs, starts, stops, and uninstalls cleanly on Windows 10/11 and Windows Server 2019+.
• All logging appears in Event Viewer under a custom source.
• When I drop a mock fault (e.g., disconnect the network adapter), the service retries according to back-off rules and logs the incident instead of terminating.
• Code follows .NET naming conventions, is fully commented, and builds without warnings.

If you have experience with long-running C# services and structured logging, this should be straightforward. I’ll provide the current code base and a test environment as soon as we start.