0

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.

Madurika Welivita
  • 890
  • 1
  • 10
  • 19
  • You never start the job you just resume it. Dont you need to start the job before you can resume it. It has been awhile since I did any dev using BITS. – Sean Barlow Mar 04 '13 at 17:37
  • I am new to BITS, I don't know how to `START` job. All the samples in web just do `RESUME` http://www.codeproject.com/Articles/14727/SharpBITS-NET-A-Wrapper-for-the-BITS-API – Madurika Welivita Mar 04 '13 at 17:39
  • I checked my GAC for SharpBITS.Base.dll, but its not there, I think I need to install this into GAC to get my file download job done. I have SharpBITS.Base.dll with me, so how can I install this dll to GAC? – Madurika Welivita Mar 05 '13 at 06:13
  • Got help from following articles : But still download job was not successful. http://sujeetji.wordpress.com/2011/01/09/assign-change-strong-name-to-existing-assembly/ http://stackoverflow.com/questions/3054304/gacutil-exe-successfully-adds-assembly-but-assembly-not-viewable-in-explorer-w – Madurika Welivita Mar 05 '13 at 07:01

1 Answers1

0

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

Udo
  • 449
  • 3
  • 13