BITS does not download sample text file

371 views Asked by At

I have following code :

 BitsManager manager = new BitsManager();
 manager.EnumJobs(JobOwner.CurrentUser);

 BitsJob newJob = manager.CreateJob("TestJob", JobType.Download);

 string remoteFile = @"http://www.pdrrelaunch.com/img/New Text Document.txt";
 string localFile = @"C:\temp\Test Folder\New Text Document.txt";
 newJob.AddFile(remoteFile,localFile);
 newJob.Resume();

BITS is running, I am using win7 64-bit machine. What the reason for the text file (New Text Document.txt) is not created in the destination folder. Also , this remote location is a website deployed in local IIS.

1

There are 1 answers

0
Udo On

If you job is in the state Transferred you have to call Complete and the file will show up.