Magnus Mårtensson
Microsoft Regional Director, Azure MVP, CEO Loftysoft
Avirag Jain
Director & CTO R Systems
Mahesh Chand
Founder C# Corner, CEO Mindcracker
Chris Gali
CEO & Co-Founder Graphite
Subinder Khurana
Chief Architect StoryProcess, Founder NASSCOM DeepTech Club
Bryan Rishforth
Investor, Chairman Graphite
Bryn Everson
Director Biz Dev Graphite
Raj Tiwari
Digital Transformation Leader, Futurist and Visionary
Joseph Guadagno
Microsoft MVP, Lead Quicken Loans
Nikita Sachdev
Entrepreneur, Blockchain Enthusiast & Advisor, Social Media Influencer
Doug Wagner
COO & Founder Adapt Technical Group
Ritesh Modi
Architect, Senior Evangelist, Cloud Architect
Crystal Wenrick
Director Communications Mindcracker
Allen O’Neill
Microsoft MVP, Consulting Engineer/Architect
Praveen Kumar
CEO MCN Solutions
Chris Love
Founder Love2Dev, Microsoft MVP, Author
Sanjay Vyas
Microsoft Regional Director, Microsoft MVP, Founder & CEO SkillLabs Technologies
Veena Sarda
Deep Learning Consultant, Author
Sekhar Srinivasan
C# Corner MVP, Microsoft Certified Trainer, Pluralsight Author
Lalit Bansal
Founder & CEO - EIY SYS
Navdeep Garg
CEO Revinfotech
Prakash Tripathi
Tech Manager/Leader, Microsoft MVP, Blogger
Bhavna Jain
Breakthrough Consultant
Naveen Sharma
Enterprise Architect, Leadership Coach, Author
Vidya Vrat Agarwal
Principal Architect, Microsoft MVP, Author
Sheetal Agarwal
Founder Clownselors, Medical Clown, Trainer
Abhishek Kant
Founder GTM Catalyst
Vishnu Saran
Founder & CEO VoiceQube
Sandeep Soni
Founder & CEO Deccansoft, Microsoft Certified Trainer
Parveen Malik
AVP InfoSec & Vulnerability Management, Information Security Expert
Nitin Pandit
Microsoft MVP, Developer Evangelist, Author
Niloshima Srivastava
C# Corner MVP, Tech Architect, Trainer, Blogger
Bala Chirtsabesan
Senior Software Engineer at Microsoft, Author
Manoj Mittal
Sr. Technical Architect, C# Corner MVP, Author
Chandni Di
Co-Founder Voice of Slum
Vithal Wadje
Technical Lead, Microsoft MVP, Author
Shivam Ahuja
Founder SkillCircle, Business Mentor
Chervine Bhiwoo
Solution Architect, Microsoft MVP, Author
Saurabh Jain
Vice President Paytm, Founder Fun2Do Labs, Author
Vinay Solanki
Head IoT at Lenovo, Founder IoT-NCR
Anshu kumari
Founder Blockchainkids, Inventor, Trainer
Amit Singal
CEO Startup Buddy
Dev Pratap
Co-Founder & CEO Voice of Slum
Amey Vartak
Technology Consultant, Full Stack Developer, C# Corner MVP, Author
Viswanatha Swamy
Principal Software Engineer, C# Corner MVP, Author
Sanket Verma
Research Engineer @ Ballistics (Forensics) and Chair, PyData Delhi
Sourabh Somani
Lead Developer, Microsoft MVP, Author
Abhishek Mishra
Software Architect, C# Corner MVP, Author
Siddharth Vaghasia
Technical Consultant, C# Corner MVP, Blogger
Bassam Alugili
Senior Software Specialist, Database Expert
S Ravi Kumar
Solution Architect, C# Corner MVP, Author
Sundaram Subramanian
Full Stack Developer, C# Corner MVP, Speaker
Deepesh Somani
Solution Architect, Microsoft MVP, Author
Debasis Saha
Technical Project Manager, C# Corner MVP, Blogger, Author
Vipul Jain
Software Architect, C# Corner MVP, Author
Akshay Patel
Technical Architect, Microsoft Certified Trainer, C# Corner MVP, Author
Stephen Simon
RPA Developer, Evangelist, Author
Vivek Sharma
Founder Kingster636, AR/VR Specialist
Jeetendra Gund
Technical Lead, C# Corner MVP, Author
Sujal Beniwal
AI Enthusiast, Student
M Viknaraj
Microsoft MVP, Azure Architect, Author
Prasham Sabadra
Software Architect, C# Corner MVP, Trainer, Author
Aakash Maurya
Senior Developer, C# Corner MVP, Speaker
Ankit Sharma
Senior Software Engineer, C# Corner MVP, Author
Mangesh Gaherwar
Team Lead, C# Corner MVP, Author
Viral Jain
Technical Consultant, C# Corner MVP, Author
Bhasker Das
Solution Architect, Evangelist
Manish Dwivedi
Associate Project Manager
Ck Nitin
Programmer, Author
Rohit Gupta
Technical Trainer, Author
Manish Tewatia
Full-stack Marketer, UX Designer
Bhavya Gaur
Technical Illustrator
Rohit Tomar
SEO/SMO Expert
Web Track
Cloud & Data Track
Dev Track
Registration & Breakfast
Future of Desktop Apps with JS (ElectronJs)
Nitin Pandit
Building Serverless Microservices Using Microsoft Azure
Vithal Wadje
Innovating RPA: A Robot for Every Person
Stephen Simon
Managing Cloud Storage Accounts using Logic Apps
Viknaraj Manogararajah
Data visualization using Python
Sekhar Srinivasan
Going Cross platform with AR Foundation
Vivek Sharma
Keynote
Managing your Azure dependencies in ASP.NET Core apps using VS
Bala Chirtsabesan
Securing Applications on Intelligent Azure
Abhishek Mishra
Getting started with Blazor the Framework of Future
S Ravi Kumar
Lunch
Build Progressive Web Apps using Angular 9
Debasis Saha
Build and deploy to any platform using Azure DevOps
Chervine Bhiwoo
Deep Dive in Azure Service Bus
Akshay Patel
Build a Native Mobile Application using React Native and JavaScript
Joseph Guadagno
Making sense of Web Job, Web Job SDK and Functions in Azure
Prakash Tripathi
CloudFront Distribution in AWS
Viral Jain
Tea Break
Introduction to PowerBI
Aakash Maurya
Build Advanced SPFx solutions with React and Graph API
Siddharth Vaghasia
Build Business Intelligence Analyst (BIA) Skills
Sundaram Subramanian
Deep dive of Power Platform – AI BUILDER
Prasham Sabadra
Panel 1
What's new in SharePoint development
Vipul Jain
Build a SSO (Single Sign On) based Native JavaScript application with Microsoft Identity within 10 minutes
Manoj Mittal
Panel 2
Applications and working of AI
Veena Sarda
Deploying serverless API's with .Net core 3.0 on AWS & Azure
Amey Vartak
Panel 3
Blockchain with .NET Core (Ark)
Anshu Kumari
Closing Note & Prize Distribution
Dev Track
Cloud Track
Architecture Track
Emerging Tech Track
Registration & Breakfast
Creating Full-Stack Web Apps Using Server-Side Blazor
Ankit Sharma
Real time face recognition with MS Cognitive Services
Niloshima Srivastava
Building Scalable APIs with GraphQL
Jeetendra Gund
Future of development with AI and Blockchain
Navdeep Garg
Debugging Tips and Tricks with Visual Studio 2019
Joseph Guadagno
Azure Containers
Abhishek Kant
Enterprise Architecture
Naveen Sharma
Bot Framework - learn it fast and look like a boss!
Allen O’Neill
Keynote
.Net Core & C# 8 Performance
David McCarter
Working with Azure kubernetes services
Ritesh Modi
Becoming an Architect
Vidyavrat Agarwal
Why Techies Need to Learn Product Management
Saurabh Jain
Lunch
Build a rules engine in .Net Core
Sanjay Vyas
Building CI and CD Pipeline using Azure DevOps
Sandeep Soni
Entity Framework Core - Tips and Tricks, Performance Optimization, and Tuning
Bassam Alugili
Hacking your way into Data Science
Sanket Verma
Speed up your .Net Core Website
Sourabh Somani
Azure
Magnus Mårtensson
Demystifying Open Distro for Elasticsearch
Suman Debnath
Future of Data
Shivam Ahuja
Tea Break
gRPC with C# and .Net Core
Mangesh Gaherwar
Panel 1
Essentials of Cloud security
Parveen Malik
Power platform and Dynamics 365
Deepesh Somani
Microservices - the gRPC Way
Viswanatha Swamy
Panel 2
Reserved
Reserved
Closing Note & Prize Distribution
Turning a Console App into a Windows Service with Topshelf
For many Australian software teams, a console application begins as a quick utility — a script that polls a queue, indexes some files, or processes a nightly batch. Once that same logic must run reliably on a Windows server at three in the morning AEST, the limitations surface: no automatic restart on failure, no clean integration with the Windows Event Log, no friendly name for a sysadmin to find in the Services console. Converting to a Windows service addresses these weaknesses, but the classical .NET ServiceBase path can be heavy. Topshelf sits in the middle — you keep a normal Main method and ship a process that behaves like a first-class service.
This walkthrough assumes Windows 10 or Windows Server 2019, either .NET Framework 4.8 or .NET 6. Topshelf's classic package leans toward .NET Framework, which suits many Australian line-of-business applications. By the end you will have a console application that runs as a console when launched directly and as a service when installed, with minimal restructuring of existing code.
When a console app falls short
Console applications execute inside an interactive session. That suits developers and Task Scheduler jobs, but it creates awkward situations in production. The process has no lifecycle management — a power blip simply kills it and leaves it dead. There is no canonical way to expose a friendly service name, description or recovery actions, and any console output disappears once the process runs unattended. An unhandled exception tends to take the entire process down with it.
In Australia, large retailers in Sydney and Melbourne, government agencies in Canberra, and banks in Brisbane often work to hardening standards informed by the Essential Eight maturity model. A standalone console process has difficulty meeting expectations around automated startup, controlled execution accounts and central logging. The Privacy Act 1988 and the Notifiable Data Breaches scheme also shape how logs are stored, rotated and audited, which pushes teams toward a hosting wrapper that integrates with Event Log rather than ad-hoc text files.
Topshelf addresses most of these gaps by layering a small framework over System.ServiceProcess.ServiceBase. Instead of writing a service class with OnStart and OnStop overrides that only run inside the service host, you keep a normal Program.Main, call HostFactory.Run and let Topshelf wire the rest. The table below compares the two approaches side by side.
| Aspect | Plain console app | Topshelf-based Windows service |
|---|---|---|
| Startup management | Manual or via Task Scheduler | SCM-managed, starts on boot |
| Crash recovery | None | Configurable first/second/subsequent actions |
| Logging | Console or custom file | Event Log, NLog or Log4Net |
| Local debugging | F5 in Visual Studio | F5 — runs as a console |
| Required code changes | None | Add Topshelf NuGet, wrap Main |
The result is identical debug behaviour for developers and real service semantics in production — a balance that has earned Topshelf a following in Australian integration consultancies.
Introducing Topshelf and the HostFactory model
Topshelf is published on NuGet as Topshelf and is an opinionated thin wrapper around ServiceBase. Once referenced, you create a service configuration by calling HostFactory.New and chaining configuration calls. The configuration declares a service name, a display name, a description, the executing account and at least one service implementation. That implementation supplies Start and Stop methods — plain methods you control — instead of overrides on a base class.
If your team has standardised on Microsoft.Extensions.Hosting for new .NET 6 services, you might ask whether Topshelf still fits. The honest answer is that Topshelf shines on .NET Framework projects and on shops that prefer minimal surface area. Many Australian software houses maintain framework applications — especially those integrating with on-prem systems in healthcare, retail and utilities — and that is where Topshelf remains a comfortable choice. For greenfield .NET 6 work, an IHostedService background worker is usually the better answer.
Install Topshelf with Install-Package Topshelf in the NuGet Package Manager, or dotnet add package Topshelf for SDK-style projects. Pair it with one of Topshelf's logging helpers so the host can write to the Event Log directly.
Setting up the project
Start with a .NET Framework console application named, say, EmailDispatcher. The existing Program.cs usually contains a tight Main loop. Open the Package Manager Console and install Topshelf. Target the same .NET Framework version your other libraries already use — there is no advantage in bumping 4.5 code to 4.8 just for this migration.
Packages most teams end up referencing:
- Topshelf — the core service host
- Topshelf.Log4Net — pluggable logging via Log4Net
- Topshelf.NLog — alternative logging adapter
- Topshelf.SysV — for cross-platform experiments on Linux
If you maintain the project across Victoria and Western Australia, think about where the binary will live — shared between regions through a DevOps artefact, or built independently for each state. Either approach works because the installer is just an executable flag, and the executable itself is region-agnostic.
Writing the service code
The migration leaves most of your business logic untouched; only the entry point changes. The new Program.cs reduces to a single HostFactory.New call that registers the service, sets the display name and description, configures the start mode, and binds Start and Stop to methods on a plain class.
Inside EmailDispatcherService.cs, implement Start and Stop directly. The Start method might spin up a System.Threading.Timer that polls a queue every thirty seconds; the Stop method cancels the timer and waits briefly for any in-flight work to finish. Because the service runs under the Service Control Manager rather than an interactive desktop, you do not need to worry about losing UI state when a session logs off.
A practical habit for Australian teams is to set the service account explicitly during configuration rather than relying on LocalSystem. From Brisbane to Perth, customers often request a dedicated service account aligned with their Active Directory structure, particularly when the service reads from network shares or writes to a confidential database. Topshelf makes this straightforward: RunAs(username, password) accepts the credentials, and DependsOn("mssql$MAIN_INSTANCE") declares dependencies on SQL Server or message-queue services so startup ordering is correct.
Installation and lifecycle management
Once compiled, the same executable behaves differently depending on how it is invoked. Launching EmailDispatcher.exe with no arguments runs the host in console mode — breakpoints work, Console.WriteLine output appears, and any exception lands in the terminal. Launching it with install registers it with the Service Control Manager, and uninstall removes it.
Operations teams in Melbourne and Sydney typically rely on a short set of commands:
- EmailDispatcher.exe install — register the service
- EmailDispatcher.exe start — start after installation
- EmailDispatcher.exe stop / uninstall — decommission cleanly
- sc query EmailDispatcher — verify the state from another host
Configuration can be passed in at install time using the syntax described in the Topshelf documentation, for example -displayname "Email Dispatcher" -description "Sends queued outbound mail". This is convenient when the same artefact is deployed to staging and production with slightly different names.
Logging, monitoring and recovery
By default, Topshelf writes to the console and a log file, but production deployments generally want structured entries in the Windows Event Log. Wiring this up involves adding Topshelf's logging helpers in the host configuration and supplying a SourceName that matches a registry entry created during an elevated install. Most automated deployment pipelines in Australian shops include a small PowerShell step that provisions the event source before the service is installed.
For recovery actions, Topshelf supports first-failure, second-failure and subsequent-failure responses such as restart, run a program, or reboot the machine. A pragmatic pattern is to restart on the first two failures and run a small diagnostic on the third, with an alert raised through whatever monitoring platform the customer uses — whether Datadog, New Relic, or a home-grown Grafana stack on AWS Sydney (ap-southeast-2) or Azure Australia East.
Privacy deserves a quick mention here. Any log line that contains personal information interacts with the Australian Privacy Principles, particularly APP 11 (security of personal information). Truncate or hash identifiers in Event Log output, and configure log retention to align with the agency's records management policy rather than indefinitely.
Running services in Australian environments
A few practicalities come up repeatedly in this part of the world. Time-zone handling is one — many scheduled jobs target business hours in Sydney or Melbourne rather than UTC, which means a job that should run at 08:00 local can drift during the AEDT-to-AEST switch if it relies on DateTime.Now. Topshelf services run in whatever time zone the host machine is configured for, so set this explicitly at deployment time, or store timestamps in UTC and convert when presenting.
Hosting choices also matter. Public cloud regions in Australia include AWS Sydney and Melbourne, Azure Australia Central, and Azure Australia East, and government customers may require that their data remain onshore. The Australian Government Cloud Policy and the hosting certification framework (IRAP) influence whether a service can run in a public hyperscaler, a certified cloud, or an on-premises data centre in Canberra. Topshelf runs equally well in all three; only the install scripts differ.
Daylight saving in Tasmania, New South Wales, Victoria, South Australia and the ACT means that jobs touching local calendars need extra care. While Topshelf itself is Windows-only, the same business logic can later be lifted into a Worker Service on .NET 6 for customers who want to modernise toward cross-platform hosting. That flexibility — write once, deploy anywhere from Perth to Parramatta — is why this compact tool still earns a place in a migration toolbox.
1, CBD, Maharaj Surajmal Road, Near Yamuna Sports Complex, Delhi, 110032
GENERAL QUERIES
Manish Tewatia
manish@csharpcon.com
+91-9718-431-042
TICKET QUERIES
Atul Gupta
conference@csharpcon.com
+91-9910-125-804