Export (0) Print
Expand All

SPWebServerCollection Class

Windows SharePoint Services 3

Represents a collection of SPWebServer objects.

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

[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPWebServerCollection : SPBaseCollection

Use the WebServers property of the SPGlobalConfig class to get the collection of Web servers in a server farm. Use an indexer to return a single Web server from the collection. For example, if the collection is assigned to a variable named myWebServers, use myWebServers[index] in C#, or myWebServers(index) in Visual Basic .NET, where index is the index number of the server in the collection.

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

© 2014 Microsoft