Hi,
The WebServer is IIS6.0. I have Windows2003 Server Operating system.
I am using the following code:
string remoteUri = "
http://localhost/UploadFiles/";
string fileName = "Sample.xml", myStringWebResource = null;
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
// Concatenate the domain with the Web resource filename.
myStringWebResource = remoteUri + fileName;
MessageBox.Show("Downloading File \"{0}\" from \"{1}\" .......\n\n" +
fileName+ ", " + myStringWebResource);
// Download the Web resource and save it into the current filesystem
folder.
myWebClient.DownloadFile(myStringWebResource,fileName);
MessageBox.Show("Successfully Downloaded File \"{0}\" from \"{1}\"" +
fileName+ ", " + myStringWebResource);
MessageBox.Show("\nDownloaded file saved in the following file system
folder:\n\t" + Application.StartupPath);