SlideShare a Scribd company logo
Fun with Windows 
Services 
Michael Melusky –Tuesday November 18, 2014 (central penn .net) 
https://twitter.com/mrjavascript 
https://github.com/mrjavascript
What is a Windows Service? 
▪ A long running executable application that runs in its own Windows 
Session 
▪ Can be started automatically upon Windows restart, can be paused 
and stopped 
▪ No user interface is shown
When to use Windows Services? 
▪ Your program accepts incoming requests and connections (e.g. mail 
server, FTP server, et al.) 
▪ If you need to do processing without an active user logged in 
▪ Monitoring queues, file systems
Managing Windows Services: 
▪ In Windows 8.1, hit WIN key and type “services.msc” 
▪ In Windows 7/XP, Run -> “services.msc”
Managing Windows Services: 
6 
5 
4 
3 
2 
1 
0 
Chart Title 
Category 1 Category 2 Category 3 Category 4 
Series 1 Series 2 Series 3
Windows Service Details 
▪ Manage Startup Type 
▪ Manage Service Status 
▪ Manage Description 
▪ Manage Security
Goal of Windows Service Development?
Alternatives to Windows Services: 
▪ Windows Task Scheduler: 
– Ideal for nightly FTP retrieval 
– Hourly backup 
– Weekly Defrag 
▪ Example (“Hello World”)
Building Services with Visual Studio 
▪ Can be built using the “Windows Service” project type in Visual 
Studio 
▪ Built with either C# or VB.NET 
▪ Example (“File Creator”)
Topshelf 
▪ http://topshelf-project.com/ 
▪ Easier approach for developing Windows Services 
▪ Can convert a Windows Console application into a Service (easy for 
debugging!) 
▪ NUGET: 
– PM> Install-Package Topshelf 
▪ Example (“File Creator Redux”)
Quartz.NET 
▪ http://www.quartz-scheduler.net/ 
▪ Enterprise Job Scheduler ported from the famous Java framework 
– Jobs implement the IJob interface 
– Jobs can be scheduled using Triggers 
– Jobs and triggers can be stored in a data store (e.g. relational database) 
▪ NUGET: 
– PM> Install-Package Quartz
log4net 
▪ http://logging.apache.org/log4net/ 
▪ Enterprise logging framework built off of the famous Java framework 
log4j 
▪ NUGET 
– PM> Install-Package log4net
Example #1 
▪ Automated Backup
Example #2 
▪ Event Viewer
Example #3 
▪ Automated SMS Resource Reminder
Example #4 
▪ Fun with OneNote
Example #5 
▪ SQL Server Job Store

More Related Content

PDF
Business Apps with the Universal Windows Platform
PDF
NodeJS and MEAN stack - II SorocabaJS
PDF
Linux Hosting Training Course [Level 1] - Lec 8
PDF
Linux Hosting Training Course Level 1-2
PDF
A Look At Flex And Php
PDF
Caddy Web Server
ODP
wmsbox in medias res Lechner Vortrag EN
PDF
Wordpress deployment on aws
Business Apps with the Universal Windows Platform
NodeJS and MEAN stack - II SorocabaJS
Linux Hosting Training Course [Level 1] - Lec 8
Linux Hosting Training Course Level 1-2
A Look At Flex And Php
Caddy Web Server
wmsbox in medias res Lechner Vortrag EN
Wordpress deployment on aws

What's hot (20)

PDF
Future development stack ~ MeteorJS
ODP
Myth or Truth? : Manage Windows like Linux with ansible
PDF
Wcf tutorials
PDF
Introducción a Nginx y PHP FPM
PDF
Design a scalable site: Problem and solutions
PPTX
Ruby on rails
KEY
$PENK->{'YAPC::Tiny'};
PPTX
Introduction to Cloud Native
PDF
Vagrantfordevops
PDF
Best practises for HTML5 servers (Devaamo Summit 2012)
PDF
10 tips for continuous integration
PDF
Zingme practice for building scalable website with PHP
PDF
Super performing websites with TYPO3 and Varnish
PPTX
Web assembly: a brief overview
PDF
T3DD12 Caching with Varnish
 
PDF
Der Freitag, A Use Case
KEY
An Introduction to Node.js Development with Windows Azure
PDF
Frost - W3C Mobile Ajax Workshop 2007
ODP
ISM APAC TechTalk - WebSockets Presentation
PPTX
UNC Chapel Hill 2014 CTC Retreat - Carolina Cloudapps / RedHat OpenShift Ente...
Future development stack ~ MeteorJS
Myth or Truth? : Manage Windows like Linux with ansible
Wcf tutorials
Introducción a Nginx y PHP FPM
Design a scalable site: Problem and solutions
Ruby on rails
$PENK->{'YAPC::Tiny'};
Introduction to Cloud Native
Vagrantfordevops
Best practises for HTML5 servers (Devaamo Summit 2012)
10 tips for continuous integration
Zingme practice for building scalable website with PHP
Super performing websites with TYPO3 and Varnish
Web assembly: a brief overview
T3DD12 Caching with Varnish
 
Der Freitag, A Use Case
An Introduction to Node.js Development with Windows Azure
Frost - W3C Mobile Ajax Workshop 2007
ISM APAC TechTalk - WebSockets Presentation
UNC Chapel Hill 2014 CTC Retreat - Carolina Cloudapps / RedHat OpenShift Ente...
Ad

Viewers also liked (12)

PPTX
An evening with querydsl
PDF
Querydsl overview 2014
PPTX
Ember.js and .NET Integration
PPTX
Fun with lambda expressions
PPTX
Building Native “apps” with Visual Studio 2015
PPTX
Emberjs and ASP.NET
ODP
Query DSL In Elasticsearch
PPTX
Securing your azure web app with asp.net core data protection
PPTX
Fun with lambda expressions
PPTX
An evening with Angular 2
PPTX
An afternoon with angular 2
PDF
10 SQL Tricks that You Didn't Think Were Possible
An evening with querydsl
Querydsl overview 2014
Ember.js and .NET Integration
Fun with lambda expressions
Building Native “apps” with Visual Studio 2015
Emberjs and ASP.NET
Query DSL In Elasticsearch
Securing your azure web app with asp.net core data protection
Fun with lambda expressions
An evening with Angular 2
An afternoon with angular 2
10 SQL Tricks that You Didn't Think Were Possible
Ad

Similar to Fun with windows services (20)

PPTX
Topic # 12 of outline Configuring Local Services.pptx
PPTX
Windows Server 2008 R2 Dev Session 01
PDF
What's this NetKernel Thing Anyway?
DOC
Lesson 4 intro to advanced o perating systems
PPTX
PDF
Novell filr customer slides richard lindstedt
PPT
PDC Highlights
PPTX
3 App Compat Win7
PDF
IRJET- Screen Monitoring using Windows Service
PDF
Protecting Linux Workloads with PlateSpin Disaster Recovery
PDF
Newlug presentation- OpenSolaris
PPT
Windows nt
PPTX
Windows Services 101
PPT
Download It
PPTX
1 Win7 For Devs Fund Search
PDF
Beyond Disaster Recovery: Restoring Production Workloads with PlateSpin Forge
PPT
Windows Workflow Foundation
DOC
MHa Resume Aug 27 2012
PDF
Essay On It 260 Quiz 1-5
Topic # 12 of outline Configuring Local Services.pptx
Windows Server 2008 R2 Dev Session 01
What's this NetKernel Thing Anyway?
Lesson 4 intro to advanced o perating systems
Novell filr customer slides richard lindstedt
PDC Highlights
3 App Compat Win7
IRJET- Screen Monitoring using Windows Service
Protecting Linux Workloads with PlateSpin Disaster Recovery
Newlug presentation- OpenSolaris
Windows nt
Windows Services 101
Download It
1 Win7 For Devs Fund Search
Beyond Disaster Recovery: Restoring Production Workloads with PlateSpin Forge
Windows Workflow Foundation
MHa Resume Aug 27 2012
Essay On It 260 Quiz 1-5

More from Mike Melusky (13)

PPTX
Container Orchestration for .NET Developers
PPTX
Containerize all the things!
PPTX
Building a Google Cloud Firestore API with dotnet core
PPTX
Effective .NET Core Unit Testing with SQLite and Dapper
PPTX
Effective .NET Core Unit Testing with SQLite and Dapper
PPTX
Reactive Web Development with Spring Boot 2
PPTX
Building xamarin.forms apps with prism and mvvm
PPTX
Introduction to react native with redux
PPTX
Xamarin.Forms Bootcamp
PPTX
An evening with React Native
PPTX
Progressive Web Apps and React
PPTX
Into to Docker (Central PA Java User Group - 8/14/2017)
ODP
Philly.NET Code Camp 2014.1
Container Orchestration for .NET Developers
Containerize all the things!
Building a Google Cloud Firestore API with dotnet core
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Reactive Web Development with Spring Boot 2
Building xamarin.forms apps with prism and mvvm
Introduction to react native with redux
Xamarin.Forms Bootcamp
An evening with React Native
Progressive Web Apps and React
Into to Docker (Central PA Java User Group - 8/14/2017)
Philly.NET Code Camp 2014.1

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PPTX
1. Introduction to Computer Programming.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Tartificialntelligence_presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
1. Introduction to Computer Programming.pptx
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Tartificialntelligence_presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)

Fun with windows services

  • 1. Fun with Windows Services Michael Melusky –Tuesday November 18, 2014 (central penn .net) https://twitter.com/mrjavascript https://github.com/mrjavascript
  • 2. What is a Windows Service? ▪ A long running executable application that runs in its own Windows Session ▪ Can be started automatically upon Windows restart, can be paused and stopped ▪ No user interface is shown
  • 3. When to use Windows Services? ▪ Your program accepts incoming requests and connections (e.g. mail server, FTP server, et al.) ▪ If you need to do processing without an active user logged in ▪ Monitoring queues, file systems
  • 4. Managing Windows Services: ▪ In Windows 8.1, hit WIN key and type “services.msc” ▪ In Windows 7/XP, Run -> “services.msc”
  • 5. Managing Windows Services: 6 5 4 3 2 1 0 Chart Title Category 1 Category 2 Category 3 Category 4 Series 1 Series 2 Series 3
  • 6. Windows Service Details ▪ Manage Startup Type ▪ Manage Service Status ▪ Manage Description ▪ Manage Security
  • 7. Goal of Windows Service Development?
  • 8. Alternatives to Windows Services: ▪ Windows Task Scheduler: – Ideal for nightly FTP retrieval – Hourly backup – Weekly Defrag ▪ Example (“Hello World”)
  • 9. Building Services with Visual Studio ▪ Can be built using the “Windows Service” project type in Visual Studio ▪ Built with either C# or VB.NET ▪ Example (“File Creator”)
  • 10. Topshelf ▪ http://topshelf-project.com/ ▪ Easier approach for developing Windows Services ▪ Can convert a Windows Console application into a Service (easy for debugging!) ▪ NUGET: – PM> Install-Package Topshelf ▪ Example (“File Creator Redux”)
  • 11. Quartz.NET ▪ http://www.quartz-scheduler.net/ ▪ Enterprise Job Scheduler ported from the famous Java framework – Jobs implement the IJob interface – Jobs can be scheduled using Triggers – Jobs and triggers can be stored in a data store (e.g. relational database) ▪ NUGET: – PM> Install-Package Quartz
  • 12. log4net ▪ http://logging.apache.org/log4net/ ▪ Enterprise logging framework built off of the famous Java framework log4j ▪ NUGET – PM> Install-Package log4net
  • 13. Example #1 ▪ Automated Backup
  • 14. Example #2 ▪ Event Viewer
  • 15. Example #3 ▪ Automated SMS Resource Reminder
  • 16. Example #4 ▪ Fun with OneNote
  • 17. Example #5 ▪ SQL Server Job Store