Begins sending a request and receiving a response from an FTP server asynchronously.
Assembly: System (in System.dll)
[<HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true)>] abstract BeginGetResponse : callback:AsyncCallback * state:Object -> IAsyncResult [<HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true)>] override BeginGetResponse : callback:AsyncCallback * state:Object -> IAsyncResult
- Type: System.AsyncCallback
An AsyncCallback delegate that references the method to invoke when the operation is complete.
- Type: System.Object
A user-defined object that contains information about the operation. This object is passed to the callback delegate when the operation completes.
You must complete the asynchronous operation by calling the EndGetResponse method. Typically, EndGetResponse is called by the method referenced by callback. To determine the state of the operation, check the properties in the IAsyncResult object returned by the method.
If the Proxy property is set, either directly or in a configuration file, communications with the FTP server are made through the specified proxy.
does not block while waiting for the response from the server. To block, call the GetResponse method in place of .
For more information about using the asynchronous programming model, see Calling Synchronous Methods Asynchronously.
This member outputs trace information when you enable network tracing in your application. For more information, see Network Tracing.
The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: ExternalThreading. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.
This method generates network traffic.
The following code example demonstrates ending an asynchronous operation to get a request's stream, and then starting a request to get the response. This code example is part of a larger example provided for the FtpWebRequest class overview.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.