Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
System.ServiceProcess Namespace

Updated: November 2007

The System.ServiceProcess namespace provides classes that allow you to implement, install, and control Windows service applications. Services are long-running executables that run without a user interface. Implementing a service involves inheriting from the ServiceBase class and defining specific behavior to process when start, stop, pause, and continue commands are passed in, as well as custom behavior and actions to take when the system shuts down.

Services are installed using an installation utility such as InstallUtil.exe. The System.ServiceProcess namespace provides installation classes that write service information to the registry. The ServiceProcessInstaller class provides an encompassing class which installs components common to all the services in an installation. For each service, you create an instance of the ServiceInstaller class to install service-specific functionality.

The ServiceController class enables you to connect to an existing service and manipulate it or get information about it. This class is typically used in an administrative capacity, and enables you to start, stop, pause, continue, or perform custom commands on a service. Where the ServiceBase class defines the processing a service performs when a command occurs, the ServiceController is the agent that enables you to call those commands on the service.

  ClassDescription
3kwsb404.pubclass(en-us,VS.90).gifServiceBase Provides a base class for a service that will exist as part of a service application. ServiceBase must be derived from when creating a new service class.
3kwsb404.pubclass(en-us,VS.90).gifServiceController Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it.
3kwsb404.pubclass(en-us,VS.90).gifServiceControllerPermission Allows control of code access security permissions for service controllers.
3kwsb404.pubclass(en-us,VS.90).gifServiceControllerPermissionAttribute Allows declarative service controller permission checks.
3kwsb404.pubclass(en-us,VS.90).gifServiceControllerPermissionEntry Defines the smallest unit of a code access security permission that is set for a ServiceController.
3kwsb404.pubclass(en-us,VS.90).gifServiceControllerPermissionEntryCollection Contains a strongly-typed collection of ServiceControllerPermissionEntry objects.
3kwsb404.pubclass(en-us,VS.90).gifServiceInstaller Installs a class that extends ServiceBase to implement a service. This class is called by the install utility when installing a service application.
3kwsb404.pubclass(en-us,VS.90).gifServiceProcessDescriptionAttribute Specifies a description for a property or event.
3kwsb404.pubclass(en-us,VS.90).gifServiceProcessInstaller Installs an executable containing classes that extend ServiceBase. This class is called by installation utilities, such as InstallUtil.exe, when installing a service application.
3kwsb404.pubclass(en-us,VS.90).gifTimeoutException The exception that is thrown when a specified timeout has expired.
  StructureDescription
3kwsb404.pubstructure(en-us,VS.90).gifSessionChangeDescription Identifies the reason for a Terminal Services session change.
  EnumerationDescription
3kwsb404.pubenumeration(en-us,VS.90).gifPowerBroadcastStatus Indicates the system's power status.
3kwsb404.pubenumeration(en-us,VS.90).gifServiceAccount Specifies a service's security context, which defines its logon type.
3kwsb404.pubenumeration(en-us,VS.90).gifServiceControllerPermissionAccess Defines access levels used by ServiceController permission classes.
3kwsb404.pubenumeration(en-us,VS.90).gifServiceControllerStatus Indicates the current state of the service.
3kwsb404.pubenumeration(en-us,VS.90).gifServiceStartMode Indicates the start mode of the service.
3kwsb404.pubenumeration(en-us,VS.90).gifServiceType Represents the type of the service.
3kwsb404.pubenumeration(en-us,VS.90).gifSessionChangeReason Specifies the reason for a Terminal Services session change notice.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker