Udostępnij za pośrednictwem


Właściwość HttpClientConnection.ServerDomain

Pobiera lub ustawia domena używane do logowania się do serwera.

Przestrzeń nazw:  Microsoft.SqlServer.Dts.Runtime
Zestaw:  Microsoft.SqlServer.ManagedDTS (w Microsoft.SqlServer.ManagedDTS.dll)

Składnia

'Deklaracja
Public Property ServerDomain As String
    Get
    Set
'Użycie
Dim instance As HttpClientConnection
Dim value As String

value = instance.ServerDomain

instance.ServerDomain = value
public string ServerDomain { get; set; }
public:
property String^ ServerDomain {
    String^ get ();
    void set (String^ value);
}
member ServerDomain : string with get, set
function get ServerDomain () : String
function set ServerDomain (value : String)

Wartość właściwości

Typ: System.String
A ciąg zawierający domena używane do logowania się do serwera.

Uwagi

Właściwość ta dotyczy tylko, jeśli używasz poświadczenia.

Przykłady

Poniższy kod ilustruje tworzenie HttpClientConnection, następnie ustawia właściwości.Wartość właściwości wymagają wymiana z wartościami, które są prawidłowe dla aplikacji.

string[] byPassList = { "http://myserver", "http://companysite" };
Package pkg = new Package();
ConnectionManager httpConn = pkg.Connections.Add("HTTP");
HttpClientConnection clientConn = new HttpClientConnection(httpConn.AcquireConnection(null));
clientConn.ChunkSize = 5;  // Default is 1.
clientConn.ProxyBypassList = byPassList;
clientConn.Timeout = 60;  // Default is 30.
clientConn.UseSecureConnection = false;

// When UseServerCredentials is true, provide Domain and Password.
clientConn.UseServerCredentials = true;
clientConn.ServerDomain = "serverLogOnDomain";
clientConn.ServerUserName = "serversUserName";
clientConn.ServerPassword = "serverPasswd"; // Write-only property.

// When UseProxyCredentials is true, provide Domain and Password.
clientConn.UseProxyCredentials = true;
clientConn.ProxyDomain = "myDomain";
clientConn.ProxyPassword = "proxyPassword";
Dim byPassList() As String = {"http://myserver", "http://companysite"}

Dim pkg As Package =  New Package() 
Dim httpConn As ConnectionManager =  pkg.Connections.Add("HTTP") 
Dim clientConn As HttpClientConnection =  New HttpClientConnection(httpConn.AcquireConnection(Nothing)) 
clientConn.ChunkSize = 5  ' Default is 1.
clientConn.ProxyBypassList = byPassList
clientConn.Timeout = 60  ' Default is 30.
clientConn.UseSecureConnection = False
 
' When UseServerCredentials is true, provide Domain and Password.
clientConn.UseServerCredentials = True
clientConn.ServerDomain = "serverLogOnDomain"
clientConn.ServerUserName = "serversUserName"
clientConn.ServerPassword = "serverPasswd" ' Write-only property.
 
' When UseProxyCredentials is true, provide Domain and Password.
clientConn.UseProxyCredentials = True
clientConn.ProxyDomain = "myDomain"
clientConn.ProxyPassword = "proxyPassword"