Partager via


Propriété HttpClientConnection.UseProxy

Gets or sets a Boolean that indicates whether or not the connection will use a proxy.

Espace de noms :  Microsoft.SqlServer.Dts.Runtime
Assembly :  Microsoft.SqlServer.ManagedDTS (en Microsoft.SqlServer.ManagedDTS.dll)

Syntaxe

'Déclaration
Public Property UseProxy As Boolean 
    Get 
    Set
'Utilisation
Dim instance As HttpClientConnection 
Dim value As Boolean 

value = instance.UseProxy

instance.UseProxy = value
public bool UseProxy { get; set; }
public:
property bool UseProxy {
    bool get ();
    void set (bool value);
}
member UseProxy : bool with get, set
function get UseProxy () : boolean 
function set UseProxy (value : boolean)

Valeur de propriété

Type : System.Boolean
A Boolean that indicates if the connection will use a proxy. A value of true indicates that the connection will use a proxy. A value of false indicates that the connection will not use a proxy.

Notes

Default value is false.

Exemples

The following code example shows how to create an HTTP connection for a package and create a client connection. It then sets several properties, including the UseProxy property.

// 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

Voir aussi

Référence

HttpClientConnection Classe

Espace de noms Microsoft.SqlServer.Dts.Runtime