Export (0) Print
Expand All

SPWindowsService Class

Represents a Windows service that is installed on one or more servers in the server farm.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

[GuidAttribute("914E6AD5-6504-4691-AFEE-ABDB42520258")]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPWindowsService : SPService

Windows services enable you to create long-running executable applications that run in their own Windows sessions, can be automatically started when the computer starts up, can be paused and restarted, and do not show any user interface. Windows services are ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. Windows services are the type of services listed in the Services snap-in within the Administrative Tools for a server.

To return the parent Windows service of a Windows service instance, use the inherited Service property of the SPWindowsServiceInstance class. Use the Services property to get a specific Windows service that is implemented within the server farm.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft