Represents an instance of a SharePoint Foundation Web service running on a particular server.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
A Web service runs on front-end Web servers and uses Internet Information Services (IIS) Web sites to serve HTTP requests for 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.