Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ASP Page 404 Error Help Needed

Posted on 2013-12-18
3
791 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 33

Accepted Solution

by:
Big Monty earned 300 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 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 200 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

856 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