System.Net.FtpWebRequest.Proxy Property

Gets or sets the proxy used to communicate with the FTP server.

Syntax

public override IWebProxy Proxy { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The FtpWebRequest.Proxy property identifies the System.Net.IWebProxy instance that communicates with the FTP server. The proxy is set by the system by using configuration files and the Internet Explorer Local Area Network settings. To specify that no proxy should be used, set FtpWebRequest.Proxy to the proxy instance returned by the GlobalProxySelection.GetEmptyWebProxy method. For more information about automatic proxy detection, see Automatic Proxy Detection.

You must set FtpWebRequest.Proxy before writing data to the request's stream or getting the response. Changing FtpWebRequest.Proxy after calling the FtpWebRequest.GetRequestStream, FtpWebRequest.BeginGetRequestStream(AsyncCallback, object), FtpWebRequest.GetResponse, or FtpWebRequest.BeginGetResponse(AsyncCallback, object) method causes an InvalidOperationException exception.

The System.Net.FtpWebRequest class supports HTTP and ISA Firewall Client proxies.

If the specified proxy is an HTTP proxy, only the System.Net.WebRequestMethods.Ftp.DownloadFile, System.Net.WebRequestMethods.Ftp.ListDirectory, and System.Net.WebRequestMethods.Ftp.ListDirectoryDetails commands are supported.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0