WebClient Technology Sample
This sample demonstrates how to use the WebClient type to connect to an FTP server and perform common operations, such as the upload or download of files or data.
For information about using the samples, see the following topics:
To build the sample using the Command Prompt
Open the Command Prompt window and navigate to one of the language-specific subdirectories under the WebClientSample directory. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.
Type msbuild.exe WebClientSample.sln at the command line.
To build the sample using Visual Studio
Open Windows Explorer and navigate to one of the language-specific subdirectories under the WebClientSample directory.
Double-click the icon for the WebClientSample.sln file to open the file in Visual Studio.
On the Build menu, click Build Solution.
The application is built in the default \bin\Debug directory.
To run the sample
Navigate to the directory that contains the new executable, using the command prompt or Windows Explorer.
Type WebClientSample.exe at the command line.
The sample builds a console application. You must launch and run it from the Command Prompt window to view its output.
The sample assumes that the FTP server uses anonymous authentication. If you supply the name of a server that uses a different means of authentication, the requested upload or download fails. The sample also requires relative path information. Full paths are not supported.