MarkLogic XCC/.Net Library |

# ContentSourceFactory.NewContentSource Method (String, Int32, String, String, String)

Return a ContentSource object that will serve as the source of connections to the server on the given host and port, with login credentials of the given user and password. No connections are made at this time. Note that the ContentSource instance returned may be shared with other callers or threads. The implementation may choose to pool and re-use ContentSource objects for a particular host/port/user combination.

[Visual Basic]
Overloads Public Shared Function NewContentSource( _
ByVal host As String, _
ByVal port As Integer, _
ByVal user As String, _
ByVal password As String, _
ByVal contentbaseName As String _
) As ContentSource
[C#]
public static ContentSource NewContentSource(
string host,
int port,
string user,
string password,
string contentbaseName
);

#### Parameters

host
  The name or dotted-quad IP address of the server host.
port
  The port on the host to connect to.
user
  The default User Name to use for authentication.
password
  The default Password to use for authentication.
contentbaseName
  The ContentBase (database) on the ContentSource run queries against. Pass null to use the default configured on the server.

#### Return Value

A ContentSource instance representing the ContentSource.

#### See Also

ContentSourceFactory Class | Marklogic.Xcc Namespace | ContentSourceFactory.NewContentSource Overload List |