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.
If you job is in the state
Transferred
you have to callComplete
and the file will show up.