System.Net.FtpWebRequest.Proxy property
This article provides supplementary remarks to the reference documentation for this API.
Note
This property is not supported on .NET Core, and setting it has no effect. Getting the property value returns null
.
The Proxy property identifies the IWebProxy instance that communicates with the FTP server. The proxy is set by the system by using configuration files and the Local Area Network settings. To specify that no proxy should be used, set 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 Proxy before writing data to the request's stream or getting the response. Changing Proxy after calling the GetRequestStream, BeginGetRequestStream, GetResponse, or BeginGetResponse method causes an InvalidOperationException exception.
The FtpWebRequest class supports HTTP and ISA Firewall Client proxies.
If the specified proxy is an HTTP proxy, only the DownloadFile, ListDirectory, and ListDirectoryDetails commands are supported.