SPFarm.Open Method (String)

Returns an object that represents a remote server farm based on the specified connection string.

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

public static SPFarm Open(
	string connectionString
)

Parameters

connectionString
Type: System.String

Contains the connection string for the configuration database of the remote server farm.

Return Value

Type: Microsoft.SharePoint.Administration.SPFarm
An SPFarm object that represents the remote server farm.

ExceptionCondition
ArgumentNullException

SqlConnectionStringBuilder object is a null reference (Nothing in Visual Basic).

This method requires access to the remote farms configuration database. If the current user or process identity does not have permission to access the database, or if the local machine is not on the same network as the database, this call will fail with an exception of type SqlException and a message indicating that this is the case.

Show: