Geeks With Blogs
Blog Moved to http://podwysocki.codebetter.com/ Blog Moved to http://podwysocki.codebetter.com/
Update:  Put a comment in if you want the C# version of this code and I will get it to you
 
A large client of mine wanted an automated way of delivery large files picture files throughout their network.  After listening to their initial solution of FTP, I realized after some research that the Background Intelligent Transfer Service (BITS) would be a good alternative.  I could programatically use BITS to transfer files automatically to the other computer using upload job types.
 
BITS has an advantage over FTP in several ways.  The first word in the product says why it can be useful, Background.  With this solution, BITS will use only the unused bandwidth for the particular machine it is hosted.  This means ultimately that you will not face network load issues especially during mission critical operations.
 
This service also has an advantage as it uses HTTP instead of FTP to transfer files.  This is an advantage in several regards.  First, FTP uses clear text to transfer user names and passwords which can be problematic.  BITS supports many types of authentication models such as Negotiate, NTLM, Digest, Basic and yes, even Passport.  BITS also supports HTTPS which may add some latency and overhead, but for secure transmissions, it is a must.
 
The second advantage of BITS over FTP is that it is much harder to filter out FTP traffic at the firewall due to the client opening an arbitrary port to open an FTP session.  FTP requires multiple TCP connections for directory listing, upload, download, etc.  BITS traffic can be isolated to the standard ports of 80 and 443.
 
The third advantage of BITS over FTP is that BITS can suspend and resume jobs and begin again where it was suspended.  The built in FTP functionality has no such built-in mechanism to support this functionality, although there are common extensions that will support it.
 
Let's get started with two things.  First, we need the Windows 2003 SP1 SDK to get the most up to date BITS 2.0 libraries.  The download is available at this link:  http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
 
The second thing to do is familiarize ourselves with the BITS SDK which is available on the MSDN at this link:
 
Next lesson, we will talk more about the interfaces and classes involved.
Posted on Tuesday, May 9, 2006 12:47 PM Microsoft , Background Intelligent Transfer Service , .NET , Windows | Back to top


Comments on this post: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Rob, yes I have and I will get into why I'm doing things the way I am in tomorrow's lesson. The first part I'm doing here is giving a little background. Stay tuned...
Left by Matthew Podwysocki on May 09, 2006 3:41 PM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
If you are doing upload then you won't be ok with my wrapper as-is... but for download it has been used across very large enterprises successfully.

If you are doing upload, great... I'll have something to point people to when they ask :)
Left by Duncan Mackenzie on May 09, 2006 11:13 PM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
That's exactly what I'm doing as well as upload reply. You can't find that elsewhere from what I've found.
Left by Matthew Podwysocki on May 10, 2006 7:27 AM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Yes I would like a copy of the C# code.
Thanks,
Richard
Left by Richard K. Bussey on May 09, 2008 1:31 PM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
Hi, Can I please have a copy of the C# code.
Thanks for your help.
Yuhaw
Left by Yuhaw on Jun 16, 2008 9:21 AM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
hi,
can i have a copy of the C# code? trying t o determine if BITS upload is the way to go for what i need
Left by j s on Dec 29, 2008 9:13 AM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
hi,
can i have a copy of the C# code? trying t o determine if BITS upload is the way to go for what i need
Left by Das on Dec 17, 2009 9:16 PM

# re: Day 1 of the Background Intelligent Transfer Service (BITS) Managed Wrapper
Requesting Gravatar...
I have vista home premium. do i need to download Windows 2003 SP1 SDK?
does my vista support it?
Left by Das on Dec 17, 2009 9:20 PM

Your comment:
 (will show your gravatar)


Copyright © Matthew Podwysocki | Powered by: GeeksWithBlogs.net