Hi,
I'm a newbie in VB.Net programming and i'm trying to download files from
http using some BITS code that i'm trying out. the code looks as follows:
Dim myBits As New Manager
Dim currentJob As Job
Dim trans As Decimal
Dim btotal As Decimal
currentJob = myBits.CreateJob("Performance database download")
currentJob.AddFile("C:\Database\Performance.mdf",
"http://www.wits.ac.za/depts/wcs/newimages/headerwits.jpg")
currentJob.ResumeJob()
trans = currentJob.Progress.BytesTransferred
btotal = currentJob.Progress.BytesTotal
If currentJob.State = JobState.Transferred Then
currentJob.Complete()
MessageBox.Show("Done", "Download", MessageBoxButtons.OK,
MessageBoxIcon.Information)
End If
The job gets added to the list of jobs, but its permanently queued and
download never gets started. I am using the following files which i
downloaded off the microsoft site:
Imports BackgroundCopyManager
Imports Microsoft.Msdn.Samples.BITS
As i said I'm new at this so I would appreciate any information as to where
i'm going wrong.
Thanks