Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Service   (RSS)

In-depth: How .NET managed services interact with the ServiceControlManager (SCM) [Kim Hamilton]

.NET managed services are based on NT services, and both need to know how to interact with the ServiceControlManager (SCM) to remain responsive. For managed services, many of the complexities of interacting with the SCM are handled for you by System.ServiceProcess.ServiceBase;
Posted by BCLTeam | 9 Comments
Filed under:

Change in System.ServiceProcess shutdown is coming in 3.5 RTM [Inbar Gazit]

In all current versions of the Framework we do not close the actual service when we get a shutdown request from the OS. Instead we just call OnShutdown and hope that the user has overridden this method and called Stop() themselves. We found out that many
Posted by BCLTeam | 8 Comments

Installing a Managed Service with a Custom Name [Robert Villahermosa]

Title: Installing a Managed Service with a Custom Name Author: Robert Villahermosa (RobVi) An interesting customer question came to my attention a few weeks ago. The customer had created a managed service, and was installing it with a custom name that
Posted by BCLTeam | 1 Comments
Filed under:

Installing a Managed Service with a Custom Name (Part 4 of 4) [Robert Villahermosa]

Bringing it all together Ok, that’s it for the explanation – let’s see how to actually run all this and watch it work. Here are the steps to follow: 1.) Create a simple service that we want to install 2.) Create a ProjectInstaller class specifying some
Posted by BCLTeam | 0 Comments
Filed under:

Code: Installing a Managed Service with a Custom Name [Robert Villahermosa]

using System; using System.ServiceProcess; using System.Configuration.Install; using System.ComponentModel; using System.IO; public class SimpleService : ServiceBase { public static void Main() { ServiceBase.Run( new SimpleService()); } public SimpleService()
Posted by BCLTeam | 0 Comments
Filed under:

Installing a Managed Service with a Custom Name (Part 3 of 4) [Robert Villahermosa]

What happened to specifying a custom name? Ahh, I haven’t forgotten – this post was created to see how to let the user choose their own custom service name. Notice how I’ve hooked up two eventhandlers in my Project Installer code. BeforeInstall gets called
Posted by BCLTeam | 0 Comments
Filed under:

Installing a Managed Service with a Custom Name (Part 2 of 4) [Robert Villahermosa]

The Installer class Now that we have our simple service to install, let’s take a look at how we can install it. Custom installers in the .NET Framework all derive from the Installer class. There are several methods that you can override in this class,
Posted by BCLTeam | 6 Comments
Filed under:

Installing a Managed Service with a Custom Name (Part 1 of 4) [Robert Villahermosa]

An interesting customer question came to my attention a few weeks ago. The customer had created a managed service, and was installing it with a custom name that was provided at install time by the user. I’ve seen several customer applications that do
Posted by BCLTeam | 6 Comments
Filed under:
 
Page view tracker