SPWebServiceInstance Class
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

SPWebServiceInstance Class

Windows SharePoint Services 3

Represents an instance of a Windows SharePoint Services Web service running on a particular server.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[GuidAttribute("0244D4D3-80D6-4b31-B576-9AD89C58E083")]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPWebServiceInstance : SPServiceInstance

A Web service runs on front-end Web servers and uses Internet Information Services (IIS) Web sites to serve all SharePoint sites within all the SharePoint applications in the service.

Use the inherited Instances property of the SPWebService class to return an SPServiceInstanceDependencyCollection object that represents all instances of the Web service. To return the current Web service instance, use the LocalContent property. To access the collection of Web service instances that run on a specific server, use the SPWebServiceInstanceCollection constructor.

Use an indexer to return a single Web service instance from the collection. For example, if the collection is assigned to a variable named myWebServiceInstances, use myWebServiceInstances[index] in C#, or myWebServiceInstances(index) in Visual Basic, where index is either the name or the GUID identifying the Web service instance.

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