Welcome to Atlanta .NET Regular Guys Sign in | Join | Help

HOWTO: Overwrite existing files when transmitting via BITS

fancy FTP graphic from www.BoxedArt.com

A while back I wrote a .NET wrapper around Microsoft’s Background Intelligent Transfer Service.  Well, truthfully, I adapted and enhanced one I found online.  But the point it this – BITS works great when trying to send files up from a client to a server b/c of the built in retry and the network activity throttle.  Of course, that throttle can be a big pain when you want files to transmit quickly, but BITS supports the idea of job priorities so you ratchet up the priority to increase transmission speeds.  However, what if you want to overwrite the file you are transmitting.  Maybe the last one was a mistake.  Maybe you’re just testing with the same data over and over.  Whatever, there are sometimes valid reasons to overwrite transmitted files.  BITS doesn’t want you to do this, and the process of turning it on is NOT a simple checkbox inside of IIS on your web server.

Here are the steps:
 
1. Open a Command Prompt session on your server. 
2. Change to your X :\InetPub\AdminScripts folder, where X is the drive that you specified for your IIS documents. 
3. Enter one of the following commands:
 
To enable overwrites:
CSCRIPT.EXE ADSUTIL.VBS SET w3svc/1/root/BITSAllowOverwrites 1
Restart IIS
 
To disable overwrites:
CSCRIPT.EXE ADSUTIL.VBS SET w3svc/1/root/BITSAllowOverwrites 0
Restart IIS
 
ADSUTIL.VBS reports back the new value for that property if the command completes successfully.
 
Here is more information on the ADSUTIL.VBS tool:
240225 Description of Adsutil and MetaEdit Utilities Used to Modify the Metabase
http://support.microsoft.com/default.aspx?scid=kb;EN-US;240225

Published 06-04-2006 08:57 by Matt Ranlett
Filed Under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

What do you think?

(required) 
(optional)
(required) 

About Matt Ranlett

One of the two original Atlanta .NET Regular Guys, Matt fills his free time by helping to run several Atlanta area user groups, the Atlanta Code Camps, and works as one of the two INETA co-Vice Presidents of Technology
SkinName:iroha_Blog2
Powered by Community Server, by Telligent Systems