httpwebrequest - Configuring Request Headers in BITS (Microsoft Background Intelligent Transfer Service) in C# -
I am trying to download a file through BITS and the job is failing (giving me an error) because I failed to mention the "Referer" request in the http header in the
bits manager manager = new bits manager (); Manager.EnumJobs (JobOwner.CurrentUser); Bitsbob Newsb = Manager. Krabzab (Jeffelmann, JobType.Download); J.jobID = newJob.JobId; Newjob Adfile (j.server link, "c: \\ download \\" + j.filename); NewJob Priority = job priority. NewJob.MinimumRetryDelay = 60; Manager.OnJobTransferred + = New Event Handler & lt; NotificationEventArgs & gt; (Manager_OnJobTransferred); Manager.OnJobModified + = New Event Handler & lt; NotificationEventArgs & gt; (Manager_OnJobModified); NewJob.Resume (); Do configure headers for GET requests for jobs? Thanks a ton,
Sunny
I think It is as if your HTTP server is not compatible with BITS HTTP requirements. HTTP Requirements for BITS Downloads
BITS supports HTTP and HTTPS downloads and uploads and requires that the server HTTP / 1.1 protocol Supports For download, the main method of the HTTP server must be to resize the file and its received method must support content-range and content-length headers. As a result, bits only transmit static file content, and if you try to move the dynamic content, then the AAP, ISAPI, or CGI script produces only an error to support content-range and content-length headers. .
Bits can use an HTTP / 1.0 server as long as it meets the head and receives the requirements of the method.
To support the downloading boundaries of a file, the server must support the following requirements:
-
Mime titles are standard content-ranges and Allow content-type to include header, and maximum headers of up to 180 bytes
-
Maximum two CR / LFS permissions between HTTPHeaders and first boundary string Please give it.
Check for more information
Comments
Post a Comment