Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP Page 404 Error Help Needed

Posted on 2013-12-18
3
Medium Priority
?
806 Views
Last Modified: 2013-12-18
Web site is on a Windows 2003 Web Server  using IIS 6 ASP and ASP.NET

the following code works great for MP3 files

It will list all file types MP3 M4A and WMA

When I click on any MP3 it will play in the browser no problem IE Firefox Chrome Safari.

When I click on M4A or WMA I get this error
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

If I convert the same .M4A file to MP3 it works

I have over 2400 hundred M4A files that I would rather not convert back to MP3.

Any thoughts on this?

<% ListFolderContents(Server.MapPath("/mp3/mp3musicalbums")) %>
<% sub ListFolderContents(path)
     dim fs, folder, file, item, url
     set fs = CreateObject("Scripting.FileSystemObject")
     set folder = fs.GetFolder(path)
    'Display the target folder and info.
     Response.Write("<h2>"& folder.Name &"</h2>")
     'Display a list of sub folders.
     for each item in folder.SubFolders
                ListFolderContents(item.Path)
     next
     'Display a list of files.
Response.Write("<ul>")
    for each item in folder.Files
       If UCase(fs.GetExtensionName(item.name)) = "MP3" or UCase(fs.GetExtensionName(item.name)) = "M4A" or UCase(fs.GetExtensionName(item.name)) = "WMA" Then
          url = MapURL(item.path)
          Response.Write("<li><a href=""" & url & """>" & item.Name & "</a></li>")
       end if
    next
        Response.Write("</ul>")
   end sub
   function MapURL(path)
     dim rootPath, url
     'Convert a physical file path to a URL for hypertext links.
     url = "/mp3/" & Right(path, Len(path) - 9)
     MapURL = Replace(url, "\", "/")
end function  %>

Open in new window

0
Comment
Question by:Thomas Grassi
3 Comments
 
LVL 34

Accepted Solution

by:
Big Monty earned 1200 total points
ID: 39726958
try these steps:

1) Select the site to configure in IIS, right click and select "Properties"
2) Under HTTP Headers Tab, select "File Types" under the MIME Map section and select "New Type"
3) Type ".flv" as the associated extension and "video/x-flv" as the content type or "flv-application/octet-stream" I'm not sure on which one gives here.
4) for .mp4 files type ".mp4" as the extension and "video/mp4" as the mime type (this one I tested personally)
4) Select "OK",
5) type services.msc, find the "World Wide Web Publishing Service" and click on the restart icon on top or open up and choose restart
0
 
LVL 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 800 total points
ID: 39726971
You have to add the mime type to iis 6  http://support.microsoft.com/kb/326965

audio/mp4 .mp4 .m4a
0
 
LVL 23

Author Closing Comment

by:Thomas Grassi
ID: 39727055
Thanks for the fast response that did the trick now working.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question