HttpClientConnection.ServerURL 属性

定义

获取或设置指定服务器位置的 URL。

public:
 property System::String ^ ServerURL { System::String ^ get(); void set(System::String ^ value); };
public string ServerURL { get; set; }
member this.ServerURL : string with get, set
Public Property ServerURL As String

属性值

包含服务器位置的字符串。

示例

下面的代码示例演示如何为包创建 HTTP 连接并创建客户端连接。 然后,它会设置多个属性,包括该 BypassProxyOnLocal 属性。

// Create an HTTP connection.  
ConnectionManager httpConn = pkg.Connections.Add("HTTP");  
HttpClientConnection clientConn = new   
           HttpClientConnection(httpConn.AcquireConnection(null));  
string HTTPUrl = @"http://<yourserver>/<yourfolder>/test.asmx?wsdl";  
clientConn.UseProxy = true;  
clientConn.ProxyURL = @"http://<yourproxy>";  
clientConn.BypassProxyOnLocal = true;  
clientConn.ServerURL = HTTPUrl;  
' Create an HTTP connection.  
Dim httpConn As ConnectionManager =  pkg.Connections.Add("HTTP")   
HttpClientConnection clientConn = New   
           HttpClientConnection(httpConn.AcquireConnection(Nothing))  
Dim HTTPUrl As String =  "http:// <yourserver>/<yourfolder>/test.asmx?wsdl"   
clientConn.UseProxy = True  
clientConn.ProxyURL = "http://<yourproxy>"  
clientConn.BypassProxyOnLocal = True  
clientConn.ServerURL = HTTPUrl  

适用于