My Links

Archives

Serving MP3s and other media file types in .Text (from: Dave Burke)

Stage Three of the .Text freelance project went online today which included the support of uploads as post attachments and RSS support for enclosures.  I'll post code-centric info on that coming up, but wanted to first mention how to serve MP3s, M4B, WMA and other files from a community .Text site on Windows 2003 Server.  This stomped me for a bit this morning, so I wanted to pass along the solution.

Let's say the files are located in a subdirectory off the site root directory called /UPLOADS.  If you try to access them via http://MYCOMMUNITYBLOG/UPLOADS you'll receive “Resource Cannot Be Found“ and that's all you'll receive. 

There are two ways to make this work.  The first is to remove aspnet_isapi.dll wildcard extension mapping to that directory.  The second way to enable serving up media file types is to add them in the .Text web.config HttpHandler section on the following line as shown:

<HttpHandler pattern = "(\.gif|\.js|\.jpg|\.zip|\.jpeg|\.jpe|\.css|\.mp3|\.m4b|\.wma)$" type = "Dottext.Common.UrlManager.BlogStaticFileHandler, Dottext.Common" handlerType = "Direct" />

posted on Wednesday, December 22, 2004 7:36 AM

sales@tourneylogic.com Copyright © Tourney Logic