Jake Ludington's MediaBlab
Archives Game Arcade Forums Tutorials Downloads Audio Books Advertise About Blog

MediaBlab - digital entertainment for everyone

Get Our Free Newsletter

Free Subscription:

Your E-mail Address:

Our newsletter content is also available via RSS  
Add to My Yahoo!

Privacy Policy


Recommend This Page

Find something useful? Send a friend the link to this page.


Broadcast your music library anywhere in your house for free
Stream music from Windows Media Player to your Pocket PC

Having 10,000 songs on your computer is great. Being able to listen to them when you aren't at your computer is even better. Learn how to stream music anywhere in your house with free software. Our free tutorial shows you how.

Search


Google


Download Categories

Feedback

Get Windows Media Player

Using Custom HTTP Headers to Prompt for Video File Downloads

Microsoft attempts to make the Windows Media experience painless for users by automatically handling certain interactions with video files. For instance, if you click on a Web link connected to a WMV or WMA file in a Web browser, Windows Media Player automatically launches, starts buffering the file, and attempts to stream it. As a server administrator, this feature can create a frustrating experience for users.

PMC Movies, my site with videos for portable movies, offers a number of 300-500MB meant for people to download and take with them. When someone finds a movie they want to download, the natural reaction is to click the download link and expect the Save As dialog box. If the movies are stored on a Windows 2003 Server, with the default IIS configuration, the user never sees the Save As dialog. Instead, Windows Media Player opens on the user's desktop and begins playing the file. The hack from the user perspective is to right-click and save target as, which potentially confuses and frustrates users.

Microsoft provides a way to override this "stream now" behavior at the server side using a custom HTTP Header in IIS. To add the custom header, launch Internet Information Services Manager and expand your Web sites to reveal the folder where multimedia content is stored. Right-click this folder and choose Properties. Click the HTTP Headers tab, followed by the Add button.

For the Custom header name type: Content-disposition
For the Custom header value type: attachment

Click OK, click Apply, click OK.

Visit one of the Web pages linking to your content download and test the links. You should be presented with the Save As dialog.

There is a catch to this solution. By setting the Content-disposition for the entire folder, your server will pop the Save As dialog box for any file called by a Web browser, including Web pages. There are two ways to solve this problem: only store media files in the folder where you modify the Content-disposition or set the attribute on-the-fly using code.

Featured Downloads

1 Click Fix It
Clean Windows problems with one simple mouse click.

SnapStream Firefly Remote
Enjoy PC music, photos, DVDs, and TV from the comfort of your couch.

CTube! TV for PC
Watch 1500+ TV Channels on your PC - No Special Hardware Required!

TextAloud
Listen to email on your iPod.

VideoStudio 8
Create movies from your home videos in a matter of minutes.

Share Your Photos
Share photos instantly! Create private albums in just 1 click!

AccountLogon
Download the free version for quick access to Internet passwords!

SOS Crash Recovery
Quickly recover from system failure.

Axe AntiVirus Tax
Antivirus software with no annual fee.

Top 10 Games